-
Notifications
You must be signed in to change notification settings - Fork 170
Description
https://www.youtube.com/watch?v=cKhfLd5dRxI
https://www.youtube.com/watch?v=8ZMAb2UtFCE
https://www.gamereplays.org/cnczerohour/replays.php?game=2&show=details&id=320812
090837_2v2_Curious_selvizo_xRv_Alive4K__[GameReplays.org].zip
00-03-08_3v3_xXx_xCx_77_GDF_noobmast_Ranger82.zip
processDamageToContained_before2.mp4
The easy way to reproduce a very similar issue is to use a bridge, but I didn't find a way to reproduce this with a GLA Worker without a bridge:
bridge_vehicle_crew.mp4
Ordering infantry to enter an unmanned vehicle sets m_ignoreObstacleID with the target ObjectID, so that the PhysicsBehavior::onCollide can act on a collision event and make the vehicle manned again.
I suspect the GLA Worker issue comes from its m_supplyTruckStateMachine, and only applies to workers produced by the Supply Stash. I noticed that RegroupingState::onEnter, which is part of the worker's supply truck logic, can run after the enter message and will override the m_ignoreObstacleID value. AFAICS this means that the worker cannot pilot the vehicle, unless you order it to enter the vehicle again, and depending on the pathfinding it may reach the vehicle and stop, or continue and become part of the crew.
Should investigate if this case needs this code, what the side effects are, and if there's a better fix:
if (parms->m_cmdSource == CMD_FROM_PLAYER && m_supplyTruckStateMachine->getCurrentStateID() != INVALID_STATE_ID)
m_supplyTruckStateMachine->resetToDefaultState();Lines 1028 to 1042 in 926ffff
| default: | |
| { | |
| // if this is from the player, cancel our current task | |
| if( parms->m_cmdSource == CMD_FROM_PLAYER && getCurrentTask() != DOZER_TASK_INVALID ) | |
| cancelTask( getCurrentTask() ); | |
| // issue the command | |
| AIUpdateInterface::aiDoCommand(parms); | |
| // when a player issues commands, this will cause the dozer to re-evaluate what it's doing | |
| if( parms->m_cmdSource == CMD_FROM_PLAYER ) | |
| m_dozerMachine->resetToDefaultState(); | |
| break; | |