mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- split up actKillSprite into several smaller functions.
The biggest problem in here was tracking the lifetime of local variables.
This commit is contained in:
parent
36b910a253
commit
965939957e
4 changed files with 648 additions and 499 deletions
File diff suppressed because it is too large
Load diff
|
@ -217,6 +217,7 @@ void actRadiusDamage(DBloodActor* source, int x, int y, int z, int nSector, int
|
|||
spritetype *actDropObject(spritetype *pSprite, int nType);
|
||||
bool actHealDude(DBloodActor* pXDude, int a2, int a3);
|
||||
bool actHealDude(XSPRITE *pXDude, int a2, int a3);
|
||||
void actKillDude(DBloodActor* a1, DBloodActor* pSprite, DAMAGE_TYPE a3, int a4);
|
||||
void actKillDude(int a1, spritetype *pSprite, DAMAGE_TYPE a3, int a4);
|
||||
int actDamageSprite(int nSource, spritetype *pSprite, DAMAGE_TYPE a3, int a4);
|
||||
int actDamageSprite(DBloodActor* pSource, DBloodActor* pTarget, DAMAGE_TYPE damageType, int damage);
|
||||
|
|
|
@ -140,4 +140,14 @@ inline void GetActorExtents(DBloodActor* actor, int* top, int* bottom)
|
|||
GetSpriteExtents(&actor->s(), top, bottom);
|
||||
}
|
||||
|
||||
inline DBloodActor *PLAYER::fragger()
|
||||
{
|
||||
return fraggerId == -1? nullptr : &bloodActors[fraggerId];
|
||||
}
|
||||
|
||||
inline void PLAYER::setFragger(DBloodActor* actor)
|
||||
{
|
||||
fraggerId = actor == nullptr ? -1 : actor->s().index;
|
||||
}
|
||||
|
||||
END_BLD_NS
|
||||
|
|
|
@ -145,6 +145,8 @@ struct PLAYER
|
|||
int fragInfo[8];
|
||||
int teamId;
|
||||
int fraggerId;
|
||||
DBloodActor* fragger();
|
||||
void setFragger(DBloodActor*);
|
||||
int underwaterTime;
|
||||
int bubbleTime;
|
||||
int restTime;
|
||||
|
|
Loading…
Reference in a new issue