* Set the aggression of a sprite, then calculate the next aggression rate * * This moves by 'Increment' in an up or down * direction inside the min/max range for this map */
| 9198 | * direction inside the min/max range for this map |
| 9199 | */ |
| 9200 | void cFodder::Sprite_Handle_Enemy_Aggression_Set(sSprite* pSprite) { |
| 9201 | |
| 9202 | int16 Next = mGame_Data.mGamePhase_Data.mSprite_Enemy_AggressionNext; |
| 9203 | pSprite->field_62 = Next; |
| 9204 | |
| 9205 | int16 Increment = mGame_Data.mGamePhase_Data.mSprite_Enemy_AggressionIncrement; |
| 9206 | Next += Increment; |
| 9207 | |
| 9208 | if (Increment >= 0) { |
| 9209 | |
| 9210 | if (Next >= mGame_Data.mGamePhase_Data.mSprite_Enemy_AggressionMax) { |
| 9211 | Next = mGame_Data.mGamePhase_Data.mSprite_Enemy_AggressionMax; |
| 9212 | Increment = -Increment; |
| 9213 | } |
| 9214 | } |
| 9215 | else { |
| 9216 | if (Next < 0 || Next <= mGame_Data.mGamePhase_Data.mSprite_Enemy_AggressionMin) { |
| 9217 | Next = mGame_Data.mGamePhase_Data.mSprite_Enemy_AggressionMin; |
| 9218 | Increment = -Increment; |
| 9219 | } |
| 9220 | } |
| 9221 | //loc_2D90D |
| 9222 | mGame_Data.mGamePhase_Data.mSprite_Enemy_AggressionIncrement = Increment; |
| 9223 | mGame_Data.mGamePhase_Data.mSprite_Enemy_AggressionNext = Next; |
| 9224 | } |
| 9225 | |
| 9226 | int16 cFodder::Sprite_Next_WalkTarget_Set(sSprite* pSprite) { |
| 9227 |
nothing calls this directly
no outgoing calls
no test coverage detected