Fix a commander-related crash.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4155 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
d2d6f60852
commit
81de4a1622
|
@ -1184,7 +1184,8 @@ void orderUpdateDroid(DROID *psDroid)
|
|||
}
|
||||
|
||||
// make sure units in a command group are actually guarding the commander
|
||||
if (!orderStateObj(psDroid, DORDER_GUARD)
|
||||
psObj = orderStateObj(psDroid, DORDER_GUARD); // find out who is being guarded by the droid
|
||||
if (psObj == NULL
|
||||
|| psObj != (BASE_OBJECT *)psDroid->psGroup->psCommander)
|
||||
{
|
||||
orderDroidObj(psDroid, DORDER_GUARD, (BASE_OBJECT *)psDroid->psGroup->psCommander);
|
||||
|
|
Loading…
Reference in New Issue