From 9aaaf874e99369627510011c4f9ffef36a09c832 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Mon, 25 Mar 2024 11:20:11 +1100 Subject: [PATCH] fix some server-side collision calls not including object collision --- source/game/StarWorldTiles.cpp | 4 ++++ source/game/StarWorldTiles.hpp | 2 ++ 2 files changed, 6 insertions(+) diff --git a/source/game/StarWorldTiles.cpp b/source/game/StarWorldTiles.cpp index 826bfbb..be0c90b 100644 --- a/source/game/StarWorldTiles.cpp +++ b/source/game/StarWorldTiles.cpp @@ -32,6 +32,10 @@ ServerTile::ServerTile(ServerTile const& serverTile) : WorldTile() { *this = serverTile; } +bool ServerTile::isColliding(CollisionSet const& collisionSet) const { + return Star::isColliding(getCollision(), collisionSet); +} + ServerTile& ServerTile::operator=(ServerTile const& serverTile) { WorldTile::operator=(serverTile); diff --git a/source/game/StarWorldTiles.hpp b/source/game/StarWorldTiles.hpp index 56fbb1b..a4d0dae 100644 --- a/source/game/StarWorldTiles.hpp +++ b/source/game/StarWorldTiles.hpp @@ -63,6 +63,8 @@ struct ServerTile : public WorldTile { ServerTile(ServerTile const& serverTile); ServerTile& operator=(ServerTile const& serverTile); + bool isColliding(CollisionSet const& collisionSet) const; + void write(DataStream& ds) const; void read(DataStream& ds, VersionNumber serializationVersion);