mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-13 20:42:11 +00:00
- ifsquished.
This commit is contained in:
parent
4c9655b110
commit
90d1c5f7bb
2 changed files with 14 additions and 15 deletions
|
@ -244,16 +244,16 @@ void addweapon_d(struct player_struct *p, int weapon)
|
|||
if(p->curr_weapon != weapon)
|
||||
{
|
||||
int snum;
|
||||
snum = sprite[p->i].yvel;
|
||||
snum = p->GetPlayerNum();
|
||||
|
||||
SetGameVarID(g_iWeaponVarID,weapon, snum, p->i);
|
||||
SetGameVarID(g_iWeaponVarID,weapon, snum, p->GetActor());
|
||||
if (p->curr_weapon >= 0)
|
||||
{
|
||||
SetGameVarID(g_iWorksLikeVarID, aplWeaponWorksLike[weapon][snum], snum, p->i);
|
||||
SetGameVarID(g_iWorksLikeVarID, aplWeaponWorksLike[weapon][snum], snum, p->GetActor());
|
||||
}
|
||||
else
|
||||
{
|
||||
SetGameVarID(g_iWorksLikeVarID, -1, snum, p->i);
|
||||
SetGameVarID(g_iWorksLikeVarID, -1, snum, p->GetActor());
|
||||
}
|
||||
SetGameVarID(g_iReturnVarID, 0, snum, -1);
|
||||
OnEvent(EVENT_CHANGEWEAPON, p->i, snum, -1);
|
||||
|
@ -274,13 +274,13 @@ void addweapon_d(struct player_struct *p, int weapon)
|
|||
case HANDBOMB_WEAPON:
|
||||
break;
|
||||
case SHOTGUN_WEAPON:
|
||||
S_PlayActorSound(SHOTGUN_COCK, p->i);
|
||||
S_PlayActorSound(SHOTGUN_COCK, p->GetActor());
|
||||
break;
|
||||
case PISTOL_WEAPON:
|
||||
S_PlayActorSound(INSERT_CLIP, p->i);
|
||||
S_PlayActorSound(INSERT_CLIP, p->GetActor());
|
||||
break;
|
||||
default:
|
||||
S_PlayActorSound(SELECT_WEAPON, p->i);
|
||||
S_PlayActorSound(SELECT_WEAPON, p->GetActor());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -291,12 +291,11 @@ void addweapon_d(struct player_struct *p, int weapon)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
bool ifsquished(int i, int p)
|
||||
bool ifsquished(DDukeActor* actor, int p)
|
||||
{
|
||||
if (isRR()) return false; // this function is a no-op in RR's source.
|
||||
|
||||
auto spri = &sprite[i];
|
||||
auto ht = &hittype[i];
|
||||
auto spri = &actor->s;
|
||||
bool squishme = false;
|
||||
if (spri->picnum == APLAYER && ud.clipping)
|
||||
return false;
|
||||
|
@ -316,13 +315,13 @@ bool ifsquished(int i, int p)
|
|||
{
|
||||
FTA(QUOTE_SQUISHED, &ps[p]);
|
||||
|
||||
if (badguy(&sprite[i]))
|
||||
if (badguy(actor))
|
||||
spri->xvel = 0;
|
||||
|
||||
if (spri->pal == 1)
|
||||
{
|
||||
ht->picnum = SHOTSPARK1;
|
||||
ht->extra = 1;
|
||||
actor->picnum = SHOTSPARK1;
|
||||
actor->extra = 1;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ struct ParseState
|
|||
};
|
||||
|
||||
int furthestcanseepoint(DDukeActor* i, DDukeActor* ts, int* dax, int* day);
|
||||
bool ifsquished(int i, int p);
|
||||
bool ifsquished(DDukeActor* i, int p);
|
||||
void fakebubbaspawn(int g_i, int g_p);
|
||||
void tearitup(int sect);
|
||||
void destroyit(int g_i);
|
||||
|
@ -1563,7 +1563,7 @@ int ParseState::parse(void)
|
|||
parseifelse(fi.ifhitbyweapon(g_ac) >= 0);
|
||||
break;
|
||||
case concmd_ifsquished:
|
||||
parseifelse(ifsquished(g_i, g_p) == 1);
|
||||
parseifelse(ifsquished(g_ac, g_p) == 1);
|
||||
break;
|
||||
case concmd_ifdead:
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue