Skip to content
Browse files

it's not proven yet that fromSynced is sync-safe

  • Loading branch information...
1 parent 87054db commit 04b37bcd15e640c0954aefe056c60dd79a778cbf jK committed Nov 12, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 rts/Sim/Units/CommandAI/CommandAI.cpp
View
4 rts/Sim/Units/CommandAI/CommandAI.cpp
@@ -434,7 +434,8 @@ bool CCommandAI::AllowedCommand(const Command& c, bool fromSynced)
} else {
if (c.params.size() >= 3) {
const float3 cPos(c.params[0], c.params[1], c.params[2]);
- const float gHeight = ground->GetHeightReal(cPos.x, cPos.z, fromSynced);
+ //FIXME is fromSynced really sync-safe??? const float gHeight = ground->GetHeightReal(cPos.x, cPos.z, fromSynced);
+ const float gHeight = ground->GetHeightReal(cPos.x, cPos.z, true);
#if 0
// check if attack-ground is really attack-ground
@@ -449,6 +450,7 @@ bool CCommandAI::AllowedCommand(const Command& c, bool fromSynced)
// at positions outside LOS where UHM and SHM do not
// match will not be broken)
//
+
if (!aiOrder && math::fabs(cPos.y - gHeight) > SQUARE_SIZE) {
return false;
}

0 comments on commit 04b37bc

Please sign in to comment.
Something went wrong with that request. Please try again.