Skip to content

Commit 04b37bc

Browse files
author
jK
committed
it's not proven yet that fromSynced is sync-safe
1 parent 87054db commit 04b37bc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rts/Sim/Units/CommandAI/CommandAI.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,8 @@ bool CCommandAI::AllowedCommand(const Command& c, bool fromSynced)
434434
} else {
435435
if (c.params.size() >= 3) {
436436
const float3 cPos(c.params[0], c.params[1], c.params[2]);
437-
const float gHeight = ground->GetHeightReal(cPos.x, cPos.z, fromSynced);
437+
//FIXME is fromSynced really sync-safe??? const float gHeight = ground->GetHeightReal(cPos.x, cPos.z, fromSynced);
438+
const float gHeight = ground->GetHeightReal(cPos.x, cPos.z, true);
438439

439440
#if 0
440441
// check if attack-ground is really attack-ground
@@ -449,6 +450,7 @@ bool CCommandAI::AllowedCommand(const Command& c, bool fromSynced)
449450
// at positions outside LOS where UHM and SHM do not
450451
// match will not be broken)
451452
//
453+
452454
if (!aiOrder && math::fabs(cPos.y - gHeight) > SQUARE_SIZE) {
453455
return false;
454456
}

0 commit comments

Comments
 (0)