1
1
forked from 0ad/0ad

Fix compilation following 52fcee9c91

52fcee9c91 broke compilation because spawnedRadius is not an integer.

This was SVN commit r24948.
This commit is contained in:
wraitii 2021-02-27 11:12:21 +00:00
parent e839fc29c7
commit 20b1d98a84

View File

@ -163,7 +163,7 @@ public:
return error;
// If no spawned obstruction, use a positive radius to avoid division by zero errors.
entity_pos_t spawnedRadius = fixed::FromInt(1);
entity_pos_t spawnedRadius = entity_pos_t::FromInt(1);
ICmpObstructionManager::tag_t spawnedTag;
CmpPtr<ICmpObstruction> cmpSpawnedObstruction(GetSimContext(), spawned);
@ -171,8 +171,8 @@ public:
{
spawnedRadius = cmpSpawnedObstruction->GetSize();
// Force a positive radius to avoid division by zero errors.
if (spawnedRadius == 0)
spawnedRadius = 1;
if (spawnedRadius == entity_pos_t::Zero())
spawnedRadius = entity_pos_t::FromInt(1);
spawnedTag = cmpSpawnedObstruction->GetObstruction();
}