mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
- Blood: Add some nullptr checks to the aiPatrol*()
inline bools.
This commit is contained in:
parent
7329cb8f1f
commit
ffe62da3c7
1 changed files with 4 additions and 4 deletions
|
@ -435,19 +435,19 @@ inline int aiPatrolGetVelocity(int speed, int value) {
|
|||
}
|
||||
|
||||
inline bool aiPatrolWaiting(AISTATE* pAiState) {
|
||||
return (pAiState->stateType >= kAiStatePatrolWaitL && pAiState->stateType <= kAiStatePatrolWaitW);
|
||||
return (pAiState && pAiState->stateType >= kAiStatePatrolWaitL && pAiState->stateType <= kAiStatePatrolWaitW);
|
||||
}
|
||||
|
||||
inline bool aiPatrolMoving(AISTATE* pAiState) {
|
||||
return (pAiState->stateType >= kAiStatePatrolMoveL && pAiState->stateType <= kAiStatePatrolMoveW);
|
||||
return (pAiState && pAiState->stateType >= kAiStatePatrolMoveL && pAiState->stateType <= kAiStatePatrolMoveW);
|
||||
}
|
||||
|
||||
inline bool aiPatrolTurning(AISTATE* pAiState) {
|
||||
return (pAiState->stateType >= kAiStatePatrolTurnL && pAiState->stateType <= kAiStatePatrolTurnW);
|
||||
return (pAiState && pAiState->stateType >= kAiStatePatrolTurnL && pAiState->stateType <= kAiStatePatrolTurnW);
|
||||
}
|
||||
|
||||
inline bool aiInPatrolState(AISTATE* pAiState) {
|
||||
return (pAiState->stateType >= kAiStatePatrolBase && pAiState->stateType < kAiStatePatrolMax);
|
||||
return (pAiState && pAiState->stateType >= kAiStatePatrolBase && pAiState->stateType < kAiStatePatrolMax);
|
||||
}
|
||||
|
||||
inline bool aiInPatrolState(int nAiStateType) {
|
||||
|
|
Loading…
Reference in a new issue