mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- wackedbyactor, too.
This commit is contained in:
parent
e94274a543
commit
72329eb01b
6 changed files with 11 additions and 11 deletions
|
@ -483,9 +483,9 @@ void moveplayers(void) //Players
|
|||
|
||||
p->newowner = -1;
|
||||
|
||||
if (p->wackedbyactor >= 0 && sprite[p->wackedbyactor].statnum < MAXSTATUS)
|
||||
if (p->wackedbyactor != nullptr && p->wackedbyactor->s.statnum < MAXSTATUS)
|
||||
{
|
||||
p->angle.addadjustment(FixedToFloat(getincangleq16(p->angle.ang.asq16(), gethiq16angle(sprite[p->wackedbyactor].x - p->posx, sprite[p->wackedbyactor].y - p->posy)) >> 1));
|
||||
p->angle.addadjustment(FixedToFloat(getincangleq16(p->angle.ang.asq16(), gethiq16angle(p->wackedbyactor->s.x - p->posx, p->wackedbyactor->s.y - p->posy)) >> 1));
|
||||
}
|
||||
}
|
||||
s->ang = p->angle.ang.asbuild();
|
||||
|
|
|
@ -891,7 +891,7 @@ int ifhitbyweapon_d(int sn)
|
|||
{
|
||||
spr->extra = 0;
|
||||
|
||||
ps[p].wackedbyactor = j;
|
||||
ps[p].wackedbyactor = &hittype[j];
|
||||
|
||||
if (htowner->picnum == APLAYER && p != htowner->yvel)
|
||||
{
|
||||
|
@ -963,7 +963,7 @@ int ifhitbyweapon_d(int sn)
|
|||
{
|
||||
p = spr->yvel;
|
||||
spr->extra = 0;
|
||||
ps[p].wackedbyactor = (short)ht->owner;
|
||||
ps[p].wackedbyactor = ht->GetHitOwner();
|
||||
|
||||
if (htowner->picnum == APLAYER && p != ht->owner)
|
||||
ps[p].frag_ps = (short)ht->owner;
|
||||
|
|
|
@ -717,7 +717,7 @@ int ifhitbyweapon_r(int sn)
|
|||
{
|
||||
npc->extra = 0;
|
||||
|
||||
ps[p].wackedbyactor = j;
|
||||
ps[p].wackedbyactor = &hittype[j];
|
||||
|
||||
if (sprite[hittype[sn].owner].picnum == APLAYER && p != sprite[hittype[sn].owner].yvel)
|
||||
{
|
||||
|
|
|
@ -497,8 +497,8 @@ void DoPlayer(bool bSet, int lVar1, int lLabelID, int lVar2, int sActor, int sPl
|
|||
break;
|
||||
|
||||
case PLAYER_WACKEDBYACTOR:
|
||||
if (bSet) ps[iPlayer].wackedbyactor = lValue;
|
||||
else SetGameVarID((int)lVar2, ps[iPlayer].wackedbyactor, sActor, sPlayer);
|
||||
if (bSet) ps[iPlayer].wackedbyactor = ScriptIndexToActor(lValue);
|
||||
else SetGameVarID((int)lVar2, ActorToScriptIndex(ps[iPlayer].wackedbyactor), sActor, sPlayer);
|
||||
break;
|
||||
|
||||
case PLAYER_FRAG:
|
||||
|
@ -2263,7 +2263,7 @@ int ParseState::parse(void)
|
|||
ps[g_p].frag_ps = g_p;
|
||||
ps[g_p].horizon.ohorizoff = ps[g_p].horizon.horizoff = q16horiz(0);
|
||||
ps[g_p].opyoff = 0;
|
||||
ps[g_p].wackedbyactor = -1;
|
||||
ps[g_p].wackedbyactor = nullptr;
|
||||
ps[g_p].shield_amount = max_armour_amount;
|
||||
ps[g_p].dead_flag = 0;
|
||||
ps[g_p].pals.a = 0;
|
||||
|
|
|
@ -78,7 +78,7 @@ void resetplayerstats(int snum)
|
|||
|
||||
gFullMap = 0;
|
||||
p->dead_flag = 0;
|
||||
p->wackedbyactor = -1;
|
||||
p->wackedbyactor = nullptr;
|
||||
p->falling_counter = 0;
|
||||
p->quick_kick = 0;
|
||||
p->subweapon = 0;
|
||||
|
|
|
@ -196,7 +196,7 @@ struct player_struct
|
|||
int aim_mode, auto_aim, ftt;
|
||||
|
||||
short cursectnum, last_extra, subweapon;
|
||||
short ammo_amount[MAX_WEAPONS], wackedbyactor, frag, fraggedself;
|
||||
short ammo_amount[MAX_WEAPONS], frag, fraggedself;
|
||||
|
||||
short curr_weapon, last_weapon, tipincs, wantweaponfire;
|
||||
short holoduke_amount, newowner, hurt_delay, hbomb_hold_delay;
|
||||
|
@ -208,7 +208,7 @@ struct player_struct
|
|||
short cheat_phase;
|
||||
short dummyplayersprite, extra_extra8, quick_kick, last_quick_kick;
|
||||
short heat_amount, timebeforeexit, customexitsound;
|
||||
DDukeActor* actorsqu, *on_crane, *holoduke_on;//, *wackedbyactor, *somethingonplayer;
|
||||
DDukeActor* actorsqu, *wackedbyactor, *on_crane, *holoduke_on;//, *somethingonplayer;
|
||||
|
||||
short weaprecs[256], weapreccnt;
|
||||
unsigned int interface_toggle_flag;
|
||||
|
|
Loading…
Reference in a new issue