mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- the last remaining small functions in actors_d.cpp and actors_r.cpp.
This commit is contained in:
parent
52c342a2ff
commit
3c19f8e44e
5 changed files with 45 additions and 47 deletions
|
@ -4020,9 +4020,9 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void fall_d(int g_i, int g_p)
|
||||
void fall_d(DDukeActor *actor, int g_p)
|
||||
{
|
||||
fall_common(&hittype[g_i], g_p, JIBS6, DRONE, BLOODPOOL, SHOTSPARK1, SQUISHED, THUD, nullptr);
|
||||
fall_common(actor, g_p, JIBS6, DRONE, BLOODPOOL, SHOTSPARK1, SQUISHED, THUD, nullptr);
|
||||
}
|
||||
|
||||
bool spawnweapondebris_d(int picnum, int dnum)
|
||||
|
@ -4030,9 +4030,9 @@ bool spawnweapondebris_d(int picnum, int dnum)
|
|||
return picnum == BLIMP && dnum == SCRAP1;
|
||||
}
|
||||
|
||||
void respawnhitag_d(spritetype* g_sp)
|
||||
void respawnhitag_d(DDukeActor* actor)
|
||||
{
|
||||
switch (g_sp->picnum)
|
||||
switch (actor->s.picnum)
|
||||
{
|
||||
case FEM1:
|
||||
case FEM2:
|
||||
|
@ -4047,20 +4047,19 @@ void respawnhitag_d(spritetype* g_sp)
|
|||
case PODFEM1:
|
||||
case NAKED1:
|
||||
case STATUE:
|
||||
if (g_sp->yvel) fi.operaterespawns(g_sp->yvel);
|
||||
if (actor->s.yvel) fi.operaterespawns(actor->s.yvel);
|
||||
break;
|
||||
default:
|
||||
if (g_sp->hitag >= 0) fi.operaterespawns(g_sp->hitag);
|
||||
if (actor->s.hitag >= 0) fi.operaterespawns(actor->s.hitag);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void checktimetosleep_d(int g_i)
|
||||
void checktimetosleep_d(DDukeActor *actor)
|
||||
{
|
||||
auto g_sp = &sprite[g_i];
|
||||
if (g_sp->statnum == 6)
|
||||
if (actor->s.statnum == STAT_STANDABLE)
|
||||
{
|
||||
switch (g_sp->picnum)
|
||||
switch (actor->s.picnum)
|
||||
{
|
||||
case RUBBERCAN:
|
||||
case EXPLODINGBARREL:
|
||||
|
@ -4073,10 +4072,10 @@ void checktimetosleep_d(int g_i)
|
|||
case NUKEBARRELLEAKED:
|
||||
case TRIPBOMB:
|
||||
case EGG:
|
||||
if (hittype[g_i].timetosleep > 1)
|
||||
hittype[g_i].timetosleep--;
|
||||
else if (hittype[g_i].timetosleep == 1)
|
||||
changespritestat(g_i, 2);
|
||||
if (actor->timetosleep > 1)
|
||||
actor->timetosleep--;
|
||||
else if (actor->timetosleep == 1)
|
||||
changespritestat(actor, STAT_ZOMBIEACTOR);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4116,9 +4116,9 @@ static int fallspecial(DDukeActor *actor, int playernum)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void fall_r(int g_i, int g_p)
|
||||
void fall_r(DDukeActor* ac, int g_p)
|
||||
{
|
||||
fall_common(&hittype[g_i], g_p, JIBS6, DRONE, BLOODPOOL, SHOTSPARK1, 69, 158, fallspecial);
|
||||
fall_common(ac, g_p, JIBS6, DRONE, BLOODPOOL, SHOTSPARK1, 69, 158, fallspecial);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -4234,12 +4234,12 @@ void destroyit(DDukeActor *actor)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void mamaspawn(int g_i)
|
||||
void mamaspawn(DDukeActor *actor)
|
||||
{
|
||||
if (mamaspawn_count)
|
||||
{
|
||||
mamaspawn_count--;
|
||||
fi.spawn(g_i, RABBIT);
|
||||
spawn(actor, RABBIT);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4248,27 +4248,26 @@ bool spawnweapondebris_r(int picnum, int dnum)
|
|||
return dnum == SCRAP1;
|
||||
}
|
||||
|
||||
void respawnhitag_r(spritetype* g_sp)
|
||||
void respawnhitag_r(DDukeActor *actor)
|
||||
{
|
||||
switch (g_sp->picnum)
|
||||
switch (actor->s.picnum)
|
||||
{
|
||||
case FEM10:
|
||||
case NAKED1:
|
||||
case STATUE:
|
||||
if (g_sp->yvel) fi.operaterespawns(g_sp->yvel);
|
||||
if (actor->s.yvel) fi.operaterespawns(actor->s.yvel);
|
||||
break;
|
||||
default:
|
||||
if (g_sp->hitag >= 0) fi.operaterespawns(g_sp->hitag);
|
||||
if (actor->s.hitag >= 0) fi.operaterespawns(actor->s.hitag);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void checktimetosleep_r(int g_i)
|
||||
void checktimetosleep_r(DDukeActor *actor)
|
||||
{
|
||||
auto g_sp = &sprite[g_i];
|
||||
if (g_sp->statnum == 6)
|
||||
if (actor->s.statnum == STAT_STANDABLE)
|
||||
{
|
||||
switch (g_sp->picnum)
|
||||
switch (actor->s.picnum)
|
||||
{
|
||||
case RUBBERCAN:
|
||||
case EXPLODINGBARREL:
|
||||
|
@ -4281,10 +4280,10 @@ void checktimetosleep_r(int g_i)
|
|||
case NUKEBARRELLEAKED:
|
||||
case TRIPBOMB:
|
||||
case EGG:
|
||||
if (hittype[g_i].timetosleep > 1)
|
||||
hittype[g_i].timetosleep--;
|
||||
else if (hittype[g_i].timetosleep == 1)
|
||||
changespritestat(g_i, 2);
|
||||
if (actor->timetosleep > 1)
|
||||
actor->timetosleep--;
|
||||
else if (actor->timetosleep == 1)
|
||||
changespritestat(actor, STAT_ZOMBIEACTOR);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,16 +76,16 @@ DDukeActor* ifhitsectors_d(int sectnum);
|
|||
DDukeActor* ifhitsectors_r(int sectnum);
|
||||
int ifhitbyweapon_r(DDukeActor* sn);
|
||||
int ifhitbyweapon_d(DDukeActor* sn);
|
||||
void fall_d(int g_i, int g_p);
|
||||
void fall_r(int g_i, int g_p);
|
||||
void fall_d(DDukeActor* i, int g_p);
|
||||
void fall_r(DDukeActor* i, int g_p);
|
||||
bool spawnweapondebris_d(int picnum, int dnum);
|
||||
bool spawnweapondebris_r(int picnum, int dnum);
|
||||
void respawnhitag_d(spritetype* g_sp);
|
||||
void respawnhitag_r(spritetype* g_sp);
|
||||
void checktimetosleep_d(int g_i);
|
||||
void checktimetosleep_r(int g_i);
|
||||
void move_d(DDukeActor* g_i, int g_p, int g_x);
|
||||
void move_r(DDukeActor* g_i, int g_p, int g_x);
|
||||
void respawnhitag_d(DDukeActor* g_sp);
|
||||
void respawnhitag_r(DDukeActor* g_sp);
|
||||
void checktimetosleep_d(DDukeActor* g_i);
|
||||
void checktimetosleep_r(DDukeActor* g_i);
|
||||
void move_d(DDukeActor* i, int g_p, int g_x);
|
||||
void move_r(DDukeActor* i, int g_p, int g_x);
|
||||
int spawn_d(int j, int pn);
|
||||
int spawn_r(int j, int pn);
|
||||
void incur_damage_d(struct player_struct* p);
|
||||
|
|
|
@ -95,11 +95,11 @@ struct Dispatcher
|
|||
void (*guts)(DDukeActor* s, short gtype, short n, short p);
|
||||
DDukeActor* (*ifhitsectors)(int sectnum);
|
||||
int (*ifhitbyweapon)(DDukeActor* sectnum);
|
||||
void (*fall)(int g_i, int g_p);
|
||||
void (*fall)(DDukeActor* g_i, int g_p);
|
||||
bool (*spawnweapondebris)(int picnum, int dnum);
|
||||
void (*respawnhitag)(spritetype* g_sp);
|
||||
void (*checktimetosleep)(int g_i);
|
||||
void (*move)(DDukeActor* g_i, int g_p, int g_x);
|
||||
void (*respawnhitag)(DDukeActor* g_sp);
|
||||
void (*checktimetosleep)(DDukeActor* g_i);
|
||||
void (*move)(DDukeActor* i, int g_p, int g_x);
|
||||
int (*spawn)(int j, int pn);
|
||||
|
||||
// player
|
||||
|
|
|
@ -85,7 +85,7 @@ bool ifsquished(DDukeActor* i, int p);
|
|||
void fakebubbaspawn(DDukeActor* g_i, int g_p);
|
||||
void tearitup(int sect);
|
||||
void destroyit(DDukeActor* actor);
|
||||
void mamaspawn(int g_i);
|
||||
void mamaspawn(DDukeActor* g_i);
|
||||
void forceplayerangle(int snum);
|
||||
|
||||
bool killthesprite = false;
|
||||
|
@ -1644,7 +1644,7 @@ int ParseState::parse(void)
|
|||
insptr++;
|
||||
break;
|
||||
case concmd_mamaspawn:
|
||||
mamaspawn(g_i);
|
||||
mamaspawn(g_ac);
|
||||
insptr++;
|
||||
break;
|
||||
case concmd_mamaquake:
|
||||
|
@ -1864,7 +1864,7 @@ int ParseState::parse(void)
|
|||
insptr++;
|
||||
g_sp->xoffset = 0;
|
||||
g_sp->yoffset = 0;
|
||||
fi.fall(g_i, g_p);
|
||||
fi.fall(g_ac, g_p);
|
||||
break;
|
||||
case concmd_enda:
|
||||
case concmd_break:
|
||||
|
@ -2833,7 +2833,7 @@ int ParseState::parse(void)
|
|||
break;
|
||||
case concmd_respawnhitag:
|
||||
insptr++;
|
||||
fi.respawnhitag(g_sp);
|
||||
fi.respawnhitag(g_ac);
|
||||
break;
|
||||
case concmd_ifspritepal:
|
||||
insptr++;
|
||||
|
@ -3834,7 +3834,7 @@ void execute(int i,int p,int x)
|
|||
}
|
||||
|
||||
else if (g_sp->statnum == STAT_STANDABLE)
|
||||
fi.checktimetosleep(i);
|
||||
fi.checktimetosleep(s.g_ac);
|
||||
}
|
||||
quit:
|
||||
if (killthesprite) deletesprite(i);
|
||||
|
|
Loading…
Reference in a new issue