mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 14:41:55 +00:00
- eliminated SetEnemy(In)active.
Both were only used once, so they are now inlined.
This commit is contained in:
parent
6c867e23ee
commit
b3558d8925
3 changed files with 3 additions and 30 deletions
|
@ -613,7 +613,7 @@ ANIMATORp DoActorActionDecide(DSWActor* actor)
|
|||
// Enemy goes inactive - he is still allowed to roam about for about
|
||||
// 5 seconds trying to find another player before his active_range is
|
||||
// bumped down
|
||||
SetEnemyInactive(SpriteNum);
|
||||
RESET(u->Flags, SPR_ACTIVE);
|
||||
|
||||
// You've lost the player - now decide what to do
|
||||
action = ChooseAction(u->Personality->LostTarget);
|
||||
|
|
|
@ -6466,33 +6466,6 @@ KeyMain:
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
!AIC KEY - Set Active and Inactive code is here. It was tough to make this
|
||||
fast. Just know that the main flag is SPR_ACTIVE. Should not need to be
|
||||
changed except for possibly the u->active_range settings in the future.
|
||||
|
||||
*/
|
||||
|
||||
void
|
||||
SetEnemyActive(short SpriteNum)
|
||||
{
|
||||
USERp u = User[SpriteNum].Data();
|
||||
|
||||
SET(u->Flags, SPR_ACTIVE);
|
||||
u->inactive_time = 0;
|
||||
}
|
||||
|
||||
void
|
||||
SetEnemyInactive(short SpriteNum)
|
||||
{
|
||||
USERp u = User[SpriteNum].Data();
|
||||
|
||||
RESET(u->Flags, SPR_ACTIVE);
|
||||
}
|
||||
|
||||
|
||||
// This function mostly only adjust the active_range field
|
||||
|
||||
void
|
||||
|
@ -6555,7 +6528,8 @@ AdjustActiveRange(PLAYERp pp, short SpriteNum, int dist)
|
|||
// some huge distance
|
||||
u->active_range = 75000;
|
||||
// sprite is AWARE
|
||||
SetEnemyActive(SpriteNum);
|
||||
SET(u->Flags, SPR_ACTIVE);
|
||||
u->inactive_time = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,6 @@ bool CanMoveHere(int16_t spritenum);
|
|||
bool SpriteOverlap(int16_t spritenum_a, int16_t spritenum_b);
|
||||
int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath);
|
||||
void SpriteControl(void);
|
||||
void SetEnemyInactive(short SpriteNum);
|
||||
void DoActorZrange(short SpriteNum);
|
||||
void PreMapCombineFloors(void);
|
||||
void SpriteSetupPost(void);
|
||||
|
|
Loading…
Reference in a new issue