mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 04:20:42 +00:00
- globally replaced ->u()->.
This commit is contained in:
parent
82b883e461
commit
395a269feb
15 changed files with 106 additions and 106 deletions
|
@ -380,7 +380,7 @@ TARGETACTOR:
|
|||
if (itActor == actor || !itActor->hasU())
|
||||
continue;
|
||||
|
||||
if (TEST(itActor->u()->Flags, SPR_SUICIDE | SPR_DEAD))
|
||||
if (TEST(itActor->user.Flags, SPR_SUICIDE | SPR_DEAD))
|
||||
continue;
|
||||
|
||||
DISTANCE(actor->spr.pos.X, actor->spr.pos.Y, itActor->spr.pos.X, itActor->spr.pos.Y, dist, a, b, c);
|
||||
|
@ -543,7 +543,7 @@ ANIMATORp DoActorActionDecide(DSWActor* actor)
|
|||
auto pActor = GetPlayerSpriteNum(actor);
|
||||
// check for short range attack possibility
|
||||
if ((dist < CloseRangeDist(actor, actor->user.targetActor) && ICanSee) ||
|
||||
(pActor && pActor->hasU() && pActor->u()->WeaponNum == WPN_FIST && actor->user.ID != RIPPER2_RUN_R0 && actor->user.ID != RIPPER_RUN_R0))
|
||||
(pActor && pActor->hasU() && pActor->user.WeaponNum == WPN_FIST && actor->user.ID != RIPPER2_RUN_R0 && actor->user.ID != RIPPER_RUN_R0))
|
||||
{
|
||||
if ((actor->user.ID == COOLG_RUN_R0 && TEST(actor->spr.cstat, CSTAT_SPRITE_TRANSLUCENT)) || TEST(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE))
|
||||
action = ChooseAction(actor->user.Personality->Evasive);
|
||||
|
@ -675,14 +675,14 @@ int DoActorDecide(DSWActor* actor)
|
|||
return 0;
|
||||
|
||||
// zombie is attacking a player
|
||||
if (actor_action == InitActorAttack && actor->user.ID == ZOMBIE_RUN_R0 && actor->user.targetActor->u()->PlayerP)
|
||||
if (actor_action == InitActorAttack && actor->user.ID == ZOMBIE_RUN_R0 && actor->user.targetActor->user.PlayerP)
|
||||
{
|
||||
// Don't let zombies shoot at master
|
||||
if (GetOwner(actor) == actor->user.targetActor)
|
||||
return 0;
|
||||
|
||||
// if this player cannot take damage from this zombie(weapon) return out
|
||||
if (!PlayerTakeDamage(actor->user.targetActor->u()->PlayerP, actor))
|
||||
if (!PlayerTakeDamage(actor->user.targetActor->user.PlayerP, actor))
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1093,14 +1093,14 @@ int InitActorRunToward(DSWActor* actor)
|
|||
int InitActorAttack(DSWActor* actor)
|
||||
{
|
||||
// zombie is attacking a player
|
||||
if (actor->user.ID == ZOMBIE_RUN_R0 && actor->user.targetActor->hasU() && actor->user.targetActor->u()->PlayerP)
|
||||
if (actor->user.ID == ZOMBIE_RUN_R0 && actor->user.targetActor->hasU() && actor->user.targetActor->user.PlayerP)
|
||||
{
|
||||
// Don't let zombies shoot at master
|
||||
if (GetOwner(actor) == actor->user.targetActor)
|
||||
return 0;
|
||||
|
||||
// if this player cannot take damage from this zombie(weapon) return out
|
||||
if (!PlayerTakeDamage(actor->user.targetActor->u()->PlayerP, actor))
|
||||
if (!PlayerTakeDamage(actor->user.targetActor->user.PlayerP, actor))
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1110,7 +1110,7 @@ int InitActorAttack(DSWActor* actor)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (actor->user.targetActor->hasU() && actor->user.targetActor->u()->Health <= 0)
|
||||
if (actor->user.targetActor->hasU() && actor->user.targetActor->user.Health <= 0)
|
||||
{
|
||||
DoActorPickClosePlayer(actor);
|
||||
InitActorReposition(actor);
|
||||
|
@ -1125,8 +1125,8 @@ int InitActorAttack(DSWActor* actor)
|
|||
|
||||
// if the guy you are after is dead, look for another and
|
||||
// reposition
|
||||
if (actor->user.targetActor->hasU() && actor->user.targetActor->u()->PlayerP &&
|
||||
TEST(actor->user.targetActor->u()->PlayerP->Flags, PF_DEAD))
|
||||
if (actor->user.targetActor->hasU() && actor->user.targetActor->user.PlayerP &&
|
||||
TEST(actor->user.targetActor->user.PlayerP->Flags, PF_DEAD))
|
||||
{
|
||||
DoActorPickClosePlayer(actor);
|
||||
InitActorReposition(actor);
|
||||
|
@ -1142,7 +1142,7 @@ int InitActorAttack(DSWActor* actor)
|
|||
actor->spr.ang = NORM_ANGLE(getangle(actor->user.targetActor->spr.pos.X - actor->spr.pos.X, actor->user.targetActor->spr.pos.Y - actor->spr.pos.Y));
|
||||
|
||||
// If it's your own kind, lay off!
|
||||
if (actor->user.ID == actor->user.targetActor->u()->ID && !actor->user.targetActor->u()->PlayerP)
|
||||
if (actor->user.ID == actor->user.targetActor->user.ID && !actor->user.targetActor->user.PlayerP)
|
||||
{
|
||||
InitActorRunAway(actor);
|
||||
return 0;
|
||||
|
@ -1184,7 +1184,7 @@ int DoActorAttack(DSWActor* actor)
|
|||
|
||||
auto pActor = GetPlayerSpriteNum(actor);
|
||||
if ((actor->user.ActorActionSet->CloseAttack[0] && dist < CloseRangeDist(actor, actor->user.targetActor)) ||
|
||||
(pActor && pActor->hasU() && pActor->u()->WeaponNum == WPN_FIST)) // JBF: added null check
|
||||
(pActor && pActor->hasU() && pActor->user.WeaponNum == WPN_FIST)) // JBF: added null check
|
||||
{
|
||||
rand_num = ChooseActionNumber(actor->user.ActorActionSet->CloseAttackPercent);
|
||||
|
||||
|
|
|
@ -1016,8 +1016,8 @@ int DoBunnyQuickJump(DSWActor* actor)
|
|||
|
||||
DoActorPickClosePlayer(actor);
|
||||
|
||||
if (u->targetActor->u()->PlayerP)
|
||||
pp = u->targetActor->u()->PlayerP;
|
||||
if (u->targetActor->user.PlayerP)
|
||||
pp = u->targetActor->user.PlayerP;
|
||||
|
||||
if (tu->spal != PALETTE_PLAYER0)
|
||||
{
|
||||
|
|
|
@ -266,9 +266,9 @@ static void cmd_Give(int player, uint8_t** stream, bool skip)
|
|||
break;
|
||||
|
||||
case GIVE_HEALTH:
|
||||
if (Player[player].Actor()->u()->Health < Player[player].MaxHealth)
|
||||
if (Player[player].Actor()->user.Health < Player[player].MaxHealth)
|
||||
{
|
||||
Player[player].Actor()->u()->Health += 25;
|
||||
Player[player].Actor()->user.Health += 25;
|
||||
PutStringInfo(&Player[player], GStrings("TXTS_ADDEDHEALTH"));
|
||||
}
|
||||
break;
|
||||
|
@ -296,7 +296,7 @@ static void cmd_Give(int player, uint8_t** stream, bool skip)
|
|||
}
|
||||
|
||||
case GIVE_ARMOR:
|
||||
if (Player[player].Actor()->u()->Health < Player[player].MaxHealth)
|
||||
if (Player[player].Actor()->user.Health < Player[player].MaxHealth)
|
||||
{
|
||||
Player[player].Armor = 100;
|
||||
PutStringInfo(&Player[player], GStrings("TXTB_FULLARM"));
|
||||
|
|
|
@ -2192,7 +2192,7 @@ struct ANIMstruct
|
|||
return animactor->spr.pos.Z;
|
||||
case ANIM_Userz:
|
||||
if (animactor == nullptr) return scratch;
|
||||
return animactor->u()->sz;
|
||||
return animactor->user.sz;
|
||||
case ANIM_SUdepth:
|
||||
return sector[animindex].depth_fixed;
|
||||
default:
|
||||
|
|
|
@ -560,9 +560,9 @@ int DoCheckSwarm(DSWActor* actor)
|
|||
// Who's the closest meat!?
|
||||
DoActorPickClosePlayer(actor);
|
||||
|
||||
if (u->targetActor->u()->PlayerP)
|
||||
if (u->targetActor->user.PlayerP)
|
||||
{
|
||||
pp = u->targetActor->u()->PlayerP;
|
||||
pp = u->targetActor->user.PlayerP;
|
||||
DISTANCE(sp->pos.X, sp->pos.Y, pp->pos.X, pp->pos.Y, pdist, a, b, c);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -72,7 +72,7 @@ void InitNetPlayerOptions(void)
|
|||
{
|
||||
auto psp = &pp->Actor()->s();
|
||||
psp->pal = PALETTE_PLAYER0 + pp->TeamColor;
|
||||
pp->Actor()->u()->spal = psp->pal;
|
||||
pp->Actor()->user.spal = psp->pal;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -394,7 +394,7 @@ void PlayerUpdateKills(PLAYERp pp, short value)
|
|||
opp = Player + pnum;
|
||||
|
||||
// for everyone on the same team
|
||||
if (opp != pp && opp->Actor()->u()->spal == pp->Actor()->u()->spal)
|
||||
if (opp != pp && opp->Actor()->user.spal == pp->Actor()->user.spal)
|
||||
{
|
||||
opp->Kills += value;
|
||||
if (opp->Kills > 999)
|
||||
|
|
|
@ -1059,10 +1059,10 @@ void DoPlayerSpriteThrow(PLAYERp pp)
|
|||
{
|
||||
if (!TEST(pp->Flags, PF_DIVING|PF_FLYING|PF_CRAWLING))
|
||||
{
|
||||
if (pp->CurWpn == pp->Wpn[WPN_SWORD] && pp->Actor()->u()->Rot != sg_PlayerNinjaSword)
|
||||
if (pp->CurWpn == pp->Wpn[WPN_SWORD] && pp->Actor()->user.Rot != sg_PlayerNinjaSword)
|
||||
NewStateGroup(pp->Actor(), sg_PlayerNinjaSword);
|
||||
else
|
||||
//if (pp->CurWpn == pp->Wpn[WPN_FIST] && pp->Actor()->u()->Rot != sg_PlayerNinjaPunch)
|
||||
//if (pp->CurWpn == pp->Wpn[WPN_FIST] && pp->Actor()->user.Rot != sg_PlayerNinjaPunch)
|
||||
NewStateGroup(pp->Actor(), sg_PlayerNinjaPunch);
|
||||
//else
|
||||
// NewStateGroup(pp->Actor(), sg_PlayerNinjaThrow);
|
||||
|
@ -1396,7 +1396,7 @@ void DoPlayerWarpTeleporter(PLAYERp pp)
|
|||
//DoPlayerStand(pp);
|
||||
pp->DoPlayerAction = DoPlayerTeleportPause;
|
||||
|
||||
NewStateGroup(ppActor, ppActor->u()->ActorActionSet->Stand);
|
||||
NewStateGroup(ppActor, ppActor->user.ActorActionSet->Stand);
|
||||
|
||||
UpdatePlayerSprite(pp);
|
||||
DoSpawnTeleporterEffect(ppActor);
|
||||
|
@ -1410,7 +1410,7 @@ void DoPlayerWarpTeleporter(PLAYERp pp)
|
|||
// if someone already standing there
|
||||
if (npp->cursector == pp->cursector)
|
||||
{
|
||||
PlayerUpdateHealth(npp, -npp->Actor()->u()->Health); // Make sure he dies!
|
||||
PlayerUpdateHealth(npp, -npp->Actor()->user.Health); // Make sure he dies!
|
||||
// telefraged by teleporting player
|
||||
PlayerCheckDeath(npp, pp->Actor());
|
||||
}
|
||||
|
@ -1897,7 +1897,7 @@ void DoPlayerZrange(PLAYERp pp)
|
|||
|
||||
// prevent player from standing on Zombies
|
||||
auto fsp = &floorColl.actor()->s();
|
||||
if (fsp->statnum == STAT_ENEMY && floorColl.actor()->u()->ID == ZOMBIE_RUN_R0)
|
||||
if (fsp->statnum == STAT_ENEMY && floorColl.actor()->user.ID == ZOMBIE_RUN_R0)
|
||||
{
|
||||
pp->lo_sectp = fsp->sector();
|
||||
pp->loz = fsp->pos.Z;
|
||||
|
@ -3180,7 +3180,7 @@ void DoPlayerBeginClimb(PLAYERp pp)
|
|||
|
||||
//DamageData[u->WeaponNum].Init(pp);
|
||||
|
||||
//NewStateGroup(pp->Actor(), pp->Actor()->u()->ActorActionSet->Climb);
|
||||
//NewStateGroup(pp->Actor(), pp->Actor()->user.ActorActionSet->Climb);
|
||||
NewStateGroup(pp->Actor(), sg_PlayerNinjaClimb);
|
||||
}
|
||||
|
||||
|
@ -4975,7 +4975,7 @@ void DoPlayerBeginOperate(PLAYERp pp)
|
|||
if (pp->InventoryAmount[INVENTORY_REPAIR_KIT])
|
||||
{
|
||||
UseInventoryRepairKit(pp);
|
||||
sop->max_damage = sop->sp_child->u()->MaxHealth;
|
||||
sop->max_damage = sop->sp_child->user.MaxHealth;
|
||||
VehicleSetSmoke(sop, nullptr);
|
||||
RESET(sop->flags, SOBJ_BROKEN);
|
||||
}
|
||||
|
@ -5061,7 +5061,7 @@ void DoPlayerBeginRemoteOperate(PLAYERp pp, SECTOR_OBJECTp sop)
|
|||
if (pp->InventoryAmount[INVENTORY_REPAIR_KIT])
|
||||
{
|
||||
UseInventoryRepairKit(pp);
|
||||
sop->max_damage = sop->sp_child->u()->MaxHealth;
|
||||
sop->max_damage = sop->sp_child->user.MaxHealth;
|
||||
VehicleSetSmoke(sop, nullptr);
|
||||
RESET(sop->flags, SOBJ_BROKEN);
|
||||
}
|
||||
|
@ -5558,7 +5558,7 @@ void DoPlayerBeginDie(PLAYERp pp)
|
|||
if (gNet.TeamPlay)
|
||||
{
|
||||
// playing team play
|
||||
if (pp->Actor()->u()->spal == ku->spal)
|
||||
if (pp->Actor()->user.spal == ku->spal)
|
||||
{
|
||||
// Killed your team member
|
||||
PlayerUpdateKills(pp, -1);
|
||||
|
@ -6619,7 +6619,7 @@ void PlayerGlobal(PLAYERp pp)
|
|||
{
|
||||
////DSPRINTF(ds,"Squish diff %d, min %d, cz %d, fz %d, lo %d, hi %d",labs(pp->loz - pp->hiz)>>8,min_height>>8, pp->ceiling_dist>>8, pp->floor_dist>>8,pp->lo_sectp-sector,pp->hi_sectp-sector);
|
||||
//MONO_PRINT(ds);
|
||||
PlayerUpdateHealth(pp, -pp->Actor()->u()->Health); // Make sure he dies!
|
||||
PlayerUpdateHealth(pp, -pp->Actor()->user.Health); // Make sure he dies!
|
||||
PlayerCheckDeath(pp, nullptr);
|
||||
|
||||
if (TEST(pp->Flags, PF_DEAD))
|
||||
|
|
|
@ -282,7 +282,7 @@ int DoSkullBeginDeath(DSWActor* actor)
|
|||
// Decrease for Serp God
|
||||
auto own = GetOwner(actor);
|
||||
if (own != nullptr && own->hasU())
|
||||
own->u()->Counter--;
|
||||
own->user.Counter--;
|
||||
|
||||
// starts the explosion that does the actual damage
|
||||
|
||||
|
|
|
@ -777,7 +777,7 @@ void Terminate3DSounds(void)
|
|||
void PlaySpriteSound(DSWActor* actor, int attrib_ndx, Voc3D_Flags flags)
|
||||
{
|
||||
if (actor->hasU())
|
||||
PlaySound(actor->u()->Attrib->Sounds[attrib_ndx], actor, flags);
|
||||
PlaySound(actor->user.Attrib->Sounds[attrib_ndx], actor, flags);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
@ -583,7 +583,7 @@ void SetOwner(DSWActor* ownr, DSWActor* child, bool flag)
|
|||
{
|
||||
if (flag && ownr != nullptr && ownr->hasU())
|
||||
{
|
||||
SET(ownr->u()->Flags2, SPR2_CHILDREN);
|
||||
SET(ownr->user.Flags2, SPR2_CHILDREN);
|
||||
}
|
||||
child->ownerActor = ownr;
|
||||
}
|
||||
|
@ -604,7 +604,7 @@ void SetAttach(DSWActor* ownr, DSWActor* child)
|
|||
if (child && child->hasU() && ownr->hasU())
|
||||
{
|
||||
USERp cu = child->u();
|
||||
SET(ownr->u()->Flags2, SPR2_CHILDREN);
|
||||
SET(ownr->user.Flags2, SPR2_CHILDREN);
|
||||
cu->attachActor = ownr;
|
||||
}
|
||||
}
|
||||
|
@ -738,9 +738,9 @@ void KillActor(DSWActor* actor)
|
|||
}
|
||||
|
||||
|
||||
if (itActor->hasU() && itActor->u()->attachActor == actor)
|
||||
if (itActor->hasU() && itActor->user.attachActor == actor)
|
||||
{
|
||||
itActor->u()->attachActor = nullptr;
|
||||
itActor->user.attachActor = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -751,7 +751,7 @@ void KillActor(DSWActor* actor)
|
|||
SWStatIterator it(STAT_ENEMY);
|
||||
while (auto itActor = it.Next())
|
||||
{
|
||||
if (itActor->hasU() && itActor->u()->targetActor == actor)
|
||||
if (itActor->hasU() && itActor->user.targetActor == actor)
|
||||
{
|
||||
DoActorPickClosePlayer(itActor);
|
||||
}
|
||||
|
@ -3557,7 +3557,7 @@ bool ItemSpotClear(DSWActor* actor, short statnum, short id)
|
|||
SWSectIterator it(sip->sector());
|
||||
while (auto itActor = it.Next())
|
||||
{
|
||||
if (itActor->spr.statnum == statnum && itActor->u()->ID == id)
|
||||
if (itActor->spr.statnum == statnum && itActor->user.ID == id)
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
|
@ -3901,13 +3901,13 @@ int SpawnItemsMatch(short match)
|
|||
case 90:
|
||||
spawnedActor = BunnyHatch2(itActor);
|
||||
sp = &spawnedActor->s();
|
||||
spawnedActor->u()->spal = sp->pal = PALETTE_PLAYER8; // Boy
|
||||
spawnedActor->user.spal = sp->pal = PALETTE_PLAYER8; // Boy
|
||||
sp->ang = sip->ang;
|
||||
break;
|
||||
case 91:
|
||||
spawnedActor = BunnyHatch2(itActor);
|
||||
sp = &spawnedActor->s();
|
||||
spawnedActor->u()->spal = sp->pal = PALETTE_PLAYER0; // Girl
|
||||
spawnedActor->user.spal = sp->pal = PALETTE_PLAYER0; // Girl
|
||||
sp->ang = sip->ang;
|
||||
break;
|
||||
case 92:
|
||||
|
@ -3921,7 +3921,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_REPAIR_KIT, s_RepairKit, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -3932,7 +3932,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_STAR, s_IconStar, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -3943,7 +3943,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_LG_MINE, s_IconLgMine, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -3954,7 +3954,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_MICRO_GUN, s_IconMicroGun, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -3965,7 +3965,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_MICRO_BATTERY, s_IconMicroBattery, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -3976,7 +3976,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_GRENADE_LAUNCHER, s_IconGrenadeLauncher, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -3987,7 +3987,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_LG_GRENADE, s_IconLgGrenade, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -3998,7 +3998,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_RAIL_GUN, s_IconRailGun, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -4009,7 +4009,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_RAIL_AMMO, s_IconRailAmmo, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -4020,7 +4020,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_ROCKET, s_IconRocket, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -4031,7 +4031,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_SHOTGUN, s_IconShotgun, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -4042,7 +4042,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_LG_SHOTSHELL, s_IconLgShotshell, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -4053,7 +4053,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_GUARD_HEAD, s_IconGuardHead, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -4064,7 +4064,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_FIREBALL_LG_AMMO, s_IconFireballLgAmmo, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -4075,7 +4075,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_HEART, s_IconHeart, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -4086,7 +4086,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_HEART_LG_AMMO, s_IconHeartLgAmmo, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -4118,7 +4118,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_MEDKIT, s_IconMedkit, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -4129,7 +4129,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_SM_MEDKIT, s_IconSmMedkit, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -4140,7 +4140,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_CHEMBOMB, s_IconChemBomb, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -4151,7 +4151,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_FLASHBOMB, s_IconFlashBomb, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -4162,7 +4162,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_NUKE, s_IconNuke, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -4173,7 +4173,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_CALTROPS, s_IconCaltrops, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -4184,7 +4184,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_BOOSTER, s_IconBooster, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -4195,7 +4195,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_HEAT_CARD, s_IconHeatCard, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -4206,7 +4206,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_CLOAK, s_IconCloak, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -4217,7 +4217,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_NIGHT_VISION, s_IconNightVision, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -4229,7 +4229,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_LG_UZI_AMMO, s_IconLgUziAmmo, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -4240,7 +4240,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_GUARD_HEAD, s_IconGuardHead, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -4251,7 +4251,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_HEART, s_IconHeart, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -4263,7 +4263,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_UZIFLOOR, s_IconUziFloor, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
@ -4277,7 +4277,7 @@ int SpawnItemsMatch(short match)
|
|||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_UZI, s_IconUzi, sip->sector(), sip->pos.X, sip->pos.Y, sip->pos.Z, sip->ang, 0);
|
||||
SET(spawnedActor->u()->Flags2, SPR2_NEVER_RESPAWN);
|
||||
SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN);
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
SetupItemForJump(itActor, spawnedActor);
|
||||
|
|
|
@ -76,7 +76,7 @@ void ProcessVisOn(void)
|
|||
if (own != nullptr)
|
||||
{
|
||||
ASSERT(own->hasU());
|
||||
RESET(own->u()->Flags2, SPR2_VIS_SHADING);
|
||||
RESET(own->user.Flags2, SPR2_VIS_SHADING);
|
||||
}
|
||||
KillActor(actor);
|
||||
}
|
||||
|
|
|
@ -146,8 +146,8 @@ int DoWallMove(DSWActor* actor)
|
|||
if (SOsprite)
|
||||
{
|
||||
// move the sprite offset from center
|
||||
actor->u()->sx -= nx;
|
||||
actor->u()->sy -= ny;
|
||||
actor->user.sx -= nx;
|
||||
actor->user.sy -= ny;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -4609,8 +4609,8 @@ int DoFireballFlames(DSWActor* actor)
|
|||
{
|
||||
if (u->attachActor != nullptr)
|
||||
{
|
||||
u->attachActor->u()->flameActor = nullptr;
|
||||
u->attachActor->u()->Flags2 &= ~SPR2_FLAMEDIE;
|
||||
u->attachActor->user.flameActor = nullptr;
|
||||
u->attachActor->user.Flags2 &= ~SPR2_FLAMEDIE;
|
||||
}
|
||||
KillActor(actor);
|
||||
return 0;
|
||||
|
@ -4683,8 +4683,8 @@ int DoBreakFlames(DSWActor* actor)
|
|||
{
|
||||
if (u->attachActor != nullptr)
|
||||
{
|
||||
u->attachActor->u()->flameActor = nullptr;
|
||||
u->attachActor->u()->Flags2 &= ~SPR2_FLAMEDIE;
|
||||
u->attachActor->user.flameActor = nullptr;
|
||||
u->attachActor->user.Flags2 &= ~SPR2_FLAMEDIE;
|
||||
}
|
||||
KillActor(actor);
|
||||
return 0;
|
||||
|
@ -5009,7 +5009,7 @@ int ActorChooseDeath(DSWActor* actor, DSWActor* weapActor)
|
|||
auto own = GetOwner(weapActor);
|
||||
if (own && own->hasU())
|
||||
{
|
||||
pp = own->u()->PlayerP;
|
||||
pp = own->user.PlayerP;
|
||||
if (pp)
|
||||
{
|
||||
choosesnd=STD_RANDOM_RANGE(MAX_TAUNTAI<<8)>>8;
|
||||
|
@ -5273,7 +5273,7 @@ int ActorStdMissile(DSWActor* actor, DSWActor* weapActor)
|
|||
auto own = GetOwner(weapActor);
|
||||
if (own && own->hasU())
|
||||
{
|
||||
if (own->u()->PlayerP && GetOwner(actor) != own)
|
||||
if (own->user.PlayerP && GetOwner(actor) != own)
|
||||
{
|
||||
u->targetActor = own;
|
||||
}
|
||||
|
@ -5286,7 +5286,7 @@ int ActorStdMissile(DSWActor* actor, DSWActor* weapActor)
|
|||
// attempt to see if it was killed
|
||||
ASSERT(goal->spr.insector());
|
||||
if (goal->hasU())
|
||||
RESET(goal->u()->Flags, SPR_TARGETED);
|
||||
RESET(goal->user.Flags, SPR_TARGETED);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -5519,7 +5519,7 @@ bool PlayerTakeDamage(PLAYERp pp, DSWActor* weapActor)
|
|||
return true;
|
||||
|
||||
// if the weapons Owner is YOURSELF take damage
|
||||
if (weapOwner && weapOwner->hasU() && weapOwner->u()->PlayerP == pp)
|
||||
if (weapOwner && weapOwner->hasU() && weapOwner->user.PlayerP == pp)
|
||||
return true;
|
||||
|
||||
// if weapon IS the player no damage
|
||||
|
@ -5527,7 +5527,7 @@ bool PlayerTakeDamage(PLAYERp pp, DSWActor* weapActor)
|
|||
return false;
|
||||
|
||||
// if the weapons Owner is a player
|
||||
if (weapOwner && weapOwner->hasU() && weapOwner->u()->PlayerP)
|
||||
if (weapOwner && weapOwner->hasU() && weapOwner->user.PlayerP)
|
||||
return false;
|
||||
}
|
||||
else if (gNet.MultiGameType == MULTI_GAME_COMMBAT && gNet.TeamPlay)
|
||||
|
@ -5541,7 +5541,7 @@ bool PlayerTakeDamage(PLAYERp pp, DSWActor* weapActor)
|
|||
return true;
|
||||
|
||||
// if the weapons Owner is YOURSELF take damage
|
||||
if (weapOwner && weapOwner->hasU() && weapOwner->u()->PlayerP == pp)
|
||||
if (weapOwner && weapOwner->hasU() && weapOwner->user.PlayerP == pp)
|
||||
return true;
|
||||
|
||||
if (wu->PlayerP)
|
||||
|
@ -5552,10 +5552,10 @@ bool PlayerTakeDamage(PLAYERp pp, DSWActor* weapActor)
|
|||
}
|
||||
|
||||
// if the weapons Owner is a player
|
||||
if (weapOwner && weapOwner->hasU() && weapOwner->u()->PlayerP)
|
||||
if (weapOwner && weapOwner->hasU() && weapOwner->user.PlayerP)
|
||||
{
|
||||
// if both on the same team then no damage
|
||||
if (weapOwner->u()->spal == u->spal)
|
||||
if (weapOwner->user.spal == u->spal)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -5591,7 +5591,7 @@ bool OwnerIs(DSWActor* actor, int pic)
|
|||
{
|
||||
auto Own = GetOwner(actor);
|
||||
if (Own == nullptr || !Own->hasU()) return false;
|
||||
return Own->u()->ID == pic;
|
||||
return Own->user.ID == pic;
|
||||
}
|
||||
|
||||
|
||||
|
@ -6350,7 +6350,7 @@ int DoDamage(DSWActor* actor, DSWActor* weapActor)
|
|||
// this is special code to prevent the Zombie from taking out the Bosses to quick
|
||||
// if rail gun weapon Owner is not player
|
||||
auto own = GetOwner(weapActor);
|
||||
if (own && own->hasU() && !own->u()->PlayerP)
|
||||
if (own && own->hasU() && !own->user.PlayerP)
|
||||
{
|
||||
// if actor is a boss
|
||||
if (u->ID == ZILLA_RUN_R0 || u->ID == SERP_RUN_R0 || u->ID == SUMO_RUN_R0)
|
||||
|
@ -6861,7 +6861,7 @@ int DoDamage(DSWActor* actor, DSWActor* weapActor)
|
|||
|
||||
auto own = GetOwner(weapActor);
|
||||
if (own && own->hasU()) // For SerpGod Ring
|
||||
own->u()->Counter--;
|
||||
own->user.Counter--;
|
||||
SpawnFireballFlames(weapActor, actor);
|
||||
SetSuicide(weapActor);
|
||||
break;
|
||||
|
@ -8308,7 +8308,7 @@ int DoCoolgFire(DSWActor* actor)
|
|||
PlaySound(DIGI_CGMAGICHIT, actor, v3df_follow);
|
||||
ChangeState(actor, s_CoolgFireDone);
|
||||
auto own = GetOwner(actor);
|
||||
if (own && own->hasU() && own->u()->ID != RIPPER_RUN_R0) // JBF: added range check
|
||||
if (own && own->hasU() && own->user.ID != RIPPER_RUN_R0) // JBF: added range check
|
||||
SpawnDemonFist(actor); // Just a red magic circle flash
|
||||
return true;
|
||||
}
|
||||
|
@ -8826,7 +8826,7 @@ int DoVulcanBoulder(DSWActor* actor)
|
|||
bool OwnerIsPlayer(DSWActor* actor)
|
||||
{
|
||||
auto own = GetOwner(actor);
|
||||
return (own && own->hasU() && own->u()->PlayerP != nullptr);
|
||||
return (own && own->hasU() && own->user.PlayerP != nullptr);
|
||||
}
|
||||
|
||||
int DoMineRangeTest(DSWActor* actor, int range)
|
||||
|
@ -10504,7 +10504,7 @@ void SpawnNuclearExp(DSWActor* actor)
|
|||
auto own = GetOwner(actor);
|
||||
if (own && own->hasU())
|
||||
{
|
||||
pp = own->u()->PlayerP;
|
||||
pp = own->user.PlayerP;
|
||||
rnd_rng = RandomRange(1000);
|
||||
|
||||
if (rnd_rng > 990)
|
||||
|
@ -10819,9 +10819,9 @@ void SpawnGrenadeExp(DSWActor* actor)
|
|||
if (RandomRange(1000) > 990)
|
||||
{
|
||||
auto own = GetOwner(actor);
|
||||
if (own != nullptr && own->hasU() && own->u()->PlayerP)
|
||||
if (own != nullptr && own->hasU() && own->user.PlayerP)
|
||||
{
|
||||
PlayerSound(DIGI_LIKEFIREWORKS, v3df_follow|v3df_dontpan, own->u()->PlayerP);
|
||||
PlayerSound(DIGI_LIKEFIREWORKS, v3df_follow|v3df_dontpan, own->user.PlayerP);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11723,7 +11723,7 @@ int DoRing(DSWActor* actor)
|
|||
SPRITEp sp = &actor->s();
|
||||
auto own = GetOwner(actor);
|
||||
if (!own) return 0; // this would crash.
|
||||
PLAYERp pp = own->u()->PlayerP;;
|
||||
PLAYERp pp = own->user.PlayerP;;
|
||||
SPRITEp so = &own->s();
|
||||
int cz,fz;
|
||||
|
||||
|
@ -11763,7 +11763,7 @@ int DoRing(DSWActor* actor)
|
|||
if (u->Dist <= RING_INNER_DIST)
|
||||
{
|
||||
if (!pp)
|
||||
own->u()->Counter--;
|
||||
own->user.Counter--;
|
||||
KillActor(actor);
|
||||
return 0;
|
||||
}
|
||||
|
@ -11876,7 +11876,7 @@ int DoSerpRing(DSWActor* actor)
|
|||
auto own = GetOwner(actor);
|
||||
// if Owner does not exist or he's dead on the floor
|
||||
// kill off all of his skull children
|
||||
if (own == nullptr || own->u()->RotNum < 5)
|
||||
if (own == nullptr || own->user.RotNum < 5)
|
||||
{
|
||||
UpdateSinglePlayKills(actor);
|
||||
DoSkullBeginDeath(actor);
|
||||
|
@ -12499,7 +12499,7 @@ int InitSwordAttack(PLAYERp pp)
|
|||
|
||||
sp = &itActor->s();
|
||||
|
||||
if (itActor->u()->PlayerP == pp)
|
||||
if (itActor->user.PlayerP == pp)
|
||||
break;
|
||||
|
||||
if (!TEST(sp->extra, SPRX_PLAYER_OR_ENEMY))
|
||||
|
@ -12676,7 +12676,7 @@ int InitFistAttack(PLAYERp pp)
|
|||
{
|
||||
sp = &itActor->s();
|
||||
|
||||
if (itActor->u()->PlayerP == pp)
|
||||
if (itActor->user.PlayerP == pp)
|
||||
break;
|
||||
|
||||
if (!TEST(sp->extra, SPRX_PLAYER_OR_ENEMY))
|
||||
|
@ -14887,7 +14887,7 @@ int InitGoroChop(DSWActor* actor)
|
|||
|
||||
int InitHornetSting(DSWActor* actor)
|
||||
{
|
||||
DoDamage(actor->u()->coll.actor(), actor);
|
||||
DoDamage(actor->user.coll.actor(), actor);
|
||||
InitActorReposition(actor);
|
||||
return 0;
|
||||
}
|
||||
|
@ -15990,9 +15990,9 @@ int BulletHitSprite(DSWActor* actor, DSWActor* hitActor, int hit_x, int hit_y, i
|
|||
// spawn a red splotch
|
||||
// !FRANK! this if was incorrect - its not who is HIT, its who is SHOOTING
|
||||
//if(!hu->PlayerP)
|
||||
if (actor->u()->PlayerP)
|
||||
if (actor->user.PlayerP)
|
||||
id = UZI_SMOKE;
|
||||
else if (TEST(actor->u()->Flags, SPR_SO_ATTACHED))
|
||||
else if (TEST(actor->user.Flags, SPR_SO_ATTACHED))
|
||||
id = UZI_SMOKE;
|
||||
else // Spawn NPC uzi with less damage
|
||||
id = UZI_SMOKE+2;
|
||||
|
@ -16769,7 +16769,7 @@ int InitSobjMachineGun(DSWActor* actor, PLAYERp pp)
|
|||
{
|
||||
// spawn sparks here and pass the sprite as SO_MISSILE
|
||||
spark = SpawnBoatSparks(pp, hit.hitSector, hit.hitWall, hit.hitpos.X, hit.hitpos.Y, hit.hitpos.Z, daang);
|
||||
SET(spark->u()->Flags2, SPR2_SO_MISSILE);
|
||||
SET(spark->user.Flags2, SPR2_SO_MISSILE);
|
||||
if (MissileHitMatch(spark, -1, hit.actor()))
|
||||
return 0;
|
||||
return 0;
|
||||
|
|
|
@ -786,7 +786,7 @@ void SpawnZombie(PLAYERp pp, DSWActor* weaponActor)
|
|||
nu = actorNew->u();
|
||||
np->setsector(pp->cursector);
|
||||
SetOwner(actorNew, ownerActor);
|
||||
np->pal = nu->spal = ownerActor->u()->spal;
|
||||
np->pal = nu->spal = ownerActor->user.spal;
|
||||
np->ang = RANDOM_P2(2048);
|
||||
SetupZombie(actorNew);
|
||||
np->shade = -10;
|
||||
|
@ -838,7 +838,7 @@ void SpawnZombie2(DSWActor* actor)
|
|||
nu = actorNew->u();
|
||||
nu->Counter3 = 0;
|
||||
SetOwner(ownerActor, actorNew);
|
||||
np->pal = nu->spal = ownerActor->u()->spal;
|
||||
np->pal = nu->spal = ownerActor->user.spal;
|
||||
np->ang = RANDOM_P2(2048);
|
||||
SetupZombie(actorNew);
|
||||
np->shade = -10;
|
||||
|
|
Loading…
Reference in a new issue