MCPcopy Create free account
hub / github.com/JACoders/OpenJK / FighterIsLanding

Function FighterIsLanding

code/game/FighterNPC.cpp:321–334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319}
320
321qboolean FighterIsLanding( Vehicle_t *pVeh, playerState_t *parentPS )
322{
323
324 if ( FighterOverValidLandingSurface( pVeh )
325#ifdef QAGAME//only do this check on GAME side, because if it's CGAME, it's being predicted, and it's only predicted if the local client is the driver
326 && pVeh->m_pVehicleInfo->Inhabited( pVeh )//has to have a driver in order to be capable of landing
327#endif
328 && (pVeh->m_ucmd.forwardmove < 0||pVeh->m_ucmd.upmove<0) //decelerating or holding crouch button
329 && parentPS->speed <= MIN_LANDING_SPEED )//going slow enough to start landing - was using pVeh->m_pVehicleInfo->speedIdle, but that's still too fast
330 {
331 return qtrue;
332 }
333 return qfalse;
334}
335
336qboolean FighterIsLaunching( Vehicle_t *pVeh, playerState_t *parentPS )
337{

Callers 3

ProcessMoveCommandsFunction · 0.70
FighterNPC.cppFile · 0.70
AnimateVehicleFunction · 0.70

Calls 1

Tested by

no test coverage detected