MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / Sprite_Enemy_Set_Target

Method Sprite_Enemy_Set_Target

Source/Fodder.cpp:5496–5524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5494}
5495
5496void cFodder::Sprite_Enemy_Set_Target(sSprite* pData2C) {
5497
5498 int16 Data0 = tool_RandomGet();
5499 int16 Data4 = Data0;
5500
5501 // Bigger X movement range for low aggression
5502 if (mGame_Data.mGamePhase_Data.mSprite_Enemy_AggressionAverage < 5)
5503 Data0 &= 0x3F;
5504 else
5505 Data0 &= 0x1F;
5506
5507 if (Data4 < 0)
5508 Data0 = -Data0;
5509
5510 pData2C->field_26 += Data0;
5511
5512 Data0 = tool_RandomGet();
5513 Data4 = Data0;
5514
5515 // Bigger Y movement range for low aggression
5516 if (mGame_Data.mGamePhase_Data.mSprite_Enemy_AggressionAverage < 5)
5517 Data0 &= 0x3F;
5518 else
5519 Data0 &= 0x1F;
5520 if (Data4 < 0)
5521 Data0 = -Data0;
5522
5523 pData2C->field_28 += Data0;
5524}
5525
5526void cFodder::Sprite_Handle_Helicopter_Human(sSprite* pSprite) {
5527

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected