mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 22:51:50 +00:00
- make access_wallnum a pointer
This commit is contained in:
parent
e7369a2796
commit
caa9ef6dd3
9 changed files with 14 additions and 22 deletions
|
@ -566,16 +566,6 @@ void DoPlayer(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
|
|||
else SetGameVarID(lVar2, ps[iPlayer].access_incs, sActor, sPlayer);
|
||||
break;
|
||||
|
||||
case PLAYER_ACCESS_WALLNUM:
|
||||
if (bSet) ps[iPlayer].access_wallnum = lValue;
|
||||
else SetGameVarID(lVar2, ps[iPlayer].access_wallnum, sActor, sPlayer);
|
||||
break;
|
||||
|
||||
case PLAYER_ACCESS_SPRITENUM:
|
||||
if (bSet) ps[iPlayer].access_spritenum = ScriptIndexToActor(lValue);
|
||||
else SetGameVarID(lVar2, ActorToScriptIndex(ps[iPlayer].access_spritenum), sActor, sPlayer);
|
||||
break;
|
||||
|
||||
case PLAYER_KICKBACK_PIC:
|
||||
if (bSet) ps[iPlayer].kickback_pic = lValue;
|
||||
else SetGameVarID(lVar2, ps[iPlayer].kickback_pic, sActor, sPlayer);
|
||||
|
|
|
@ -1119,7 +1119,7 @@ DEFINE_FIELD_X(DukePlayer, player_struct, airleft)
|
|||
DEFINE_FIELD_X(DukePlayer, player_struct, knee_incs)
|
||||
DEFINE_FIELD_X(DukePlayer, player_struct, access_incs)
|
||||
DEFINE_FIELD_X(DukePlayer, player_struct, ftq)
|
||||
DEFINE_FIELD_X(DukePlayer, player_struct, access_wallnum)
|
||||
DEFINE_FIELD_X(DukePlayer, player_struct, access_wall)
|
||||
DEFINE_FIELD_X(DukePlayer, player_struct, got_access)
|
||||
DEFINE_FIELD_X(DukePlayer, player_struct, weapon_ang)
|
||||
DEFINE_FIELD_X(DukePlayer, player_struct, firstaid_amount)
|
||||
|
|
|
@ -1558,8 +1558,8 @@ int doincrements_d(struct player_struct* p)
|
|||
}
|
||||
else
|
||||
{
|
||||
fi.checkhitswitch(snum, &wall[p->access_wallnum], nullptr);
|
||||
switch (wall[p->access_wallnum].pal)
|
||||
fi.checkhitswitch(snum, p->access_wall, nullptr);
|
||||
switch (p->access_wall->pal)
|
||||
{
|
||||
case 0:p->got_access &= (0xffff - 0x1); break;
|
||||
case 21:p->got_access &= (0xffff - 0x2); break;
|
||||
|
|
|
@ -1406,8 +1406,8 @@ int doincrements_r(struct player_struct* p)
|
|||
}
|
||||
else
|
||||
{
|
||||
fi.checkhitswitch(snum, &wall[p->access_wallnum], nullptr);
|
||||
switch (wall[p->access_wallnum].pal)
|
||||
fi.checkhitswitch(snum, p->access_wall, nullptr);
|
||||
switch (p->access_wall->pal)
|
||||
{
|
||||
case 0:p->keys[1] = 1; break;
|
||||
case 21:p->keys[2] = 1; break;
|
||||
|
|
|
@ -151,7 +151,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, player_struct& w,
|
|||
("knee_incs", w.knee_incs)
|
||||
("access_incs", w.access_incs)
|
||||
("ftq", w.ftq)
|
||||
("access_wallnum", w.access_wallnum)
|
||||
("access_wallnum", w.access_wall)
|
||||
("access_spritenum", w.access_spritenum)
|
||||
("kickback_pic", w.kickback_pic)
|
||||
("got_access", w.got_access)
|
||||
|
|
|
@ -306,7 +306,7 @@ bool checkhitswitch_d(int snum, walltype* wwal, DDukeActor *act)
|
|||
if (ps[snum].access_incs == 1)
|
||||
{
|
||||
if (!act)
|
||||
ps[snum].access_wallnum = wallnum(wwal);
|
||||
ps[snum].access_wall = wwal;
|
||||
else
|
||||
ps[snum].access_spritenum = act;
|
||||
}
|
||||
|
|
|
@ -424,7 +424,7 @@ bool checkhitswitch_r(int snum, walltype* wwal, DDukeActor* act)
|
|||
if (ps[snum].access_incs == 1)
|
||||
{
|
||||
if (!act)
|
||||
ps[snum].access_wallnum = wallnum(wwal);
|
||||
ps[snum].access_wall = wwal;
|
||||
else
|
||||
ps[snum].access_spritenum = act;
|
||||
}
|
||||
|
|
|
@ -210,7 +210,8 @@ struct player_struct
|
|||
|
||||
int aim_mode, ftt;
|
||||
|
||||
int cursectnum, one_parallax_sectnum, access_wallnum; // wall + sector references. Make them pointers later?
|
||||
int cursectnum, one_parallax_sectnum; // wall + sector references. Make them pointers later?
|
||||
walltype* access_wall;
|
||||
|
||||
short last_extra, subweapon;
|
||||
short ammo_amount[MAX_WEAPONS], frag, fraggedself;
|
||||
|
|
|
@ -159,7 +159,8 @@ struct DukePlayer
|
|||
native int randomflamex, crack_time;
|
||||
native int aim_mode, ftt;
|
||||
|
||||
native int cursectnum, one_parallax_sectnum, access_wallnum;
|
||||
native int cursectnum, one_parallax_sectnum;
|
||||
//native walltype access_wall; // can't do yet.
|
||||
|
||||
native int16 last_extra, subweapon;
|
||||
native int16 ammo_amount[DukeWpn.MAX_WEAPONS], frag, fraggedself;
|
||||
|
@ -175,7 +176,7 @@ struct DukePlayer
|
|||
native int16 extra_extra8, quick_kick, last_quick_kick;
|
||||
native int16 heat_amount, timebeforeexit, customexitsound;
|
||||
//DDukeActor* actorsqu, *wackedbyactor, *on_crane, *holoduke_on, *somethingonplayer, *access_spritenum, *dummyplayersprite, *newOwner; // later
|
||||
native voidptr holoduke_on; // cannot do it as a proper actor pointer - but the status bar needs it.
|
||||
native voidptr holoduke_on; // cannot do it as a proper actor pointer yet - but the status bar needs it.
|
||||
|
||||
native int16 weaprecs[256], weapreccnt;
|
||||
native uint interface_toggle_flag;
|
||||
|
|
Loading…
Reference in a new issue