mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 22:51:50 +00:00
- SpawnExoZAdjust arguments.
This commit is contained in:
parent
dd528c5eab
commit
35579a9f08
5 changed files with 35 additions and 36 deletions
|
@ -100,10 +100,10 @@ void ProcessQuakeSpot(void);
|
||||||
void QuakeViewChange(PLAYERp pp, int* z_diff, int* x_diff, int* y_diff, short* ang_diff);
|
void QuakeViewChange(PLAYERp pp, int* z_diff, int* x_diff, int* y_diff, short* ang_diff);
|
||||||
void DoQuake(PLAYERp pp);
|
void DoQuake(PLAYERp pp);
|
||||||
bool SetQuake(PLAYERp pp, short tics, short amt);
|
bool SetQuake(PLAYERp pp, short tics, short amt);
|
||||||
int SetExpQuake(int16_t Weapon);
|
int SetExpQuake(DSWActor*);
|
||||||
int SetGunQuake(int16_t SpriteNum);
|
int SetGunQuake(int16_t SpriteNum);
|
||||||
int SetPlayerQuake(PLAYERp mpp);
|
int SetPlayerQuake(PLAYERp mpp);
|
||||||
int SetNuclearQuake(int16_t Weapon);
|
int SetNuclearQuake(DSWActor*);
|
||||||
int SetSumoQuake(DSWActor*);
|
int SetSumoQuake(DSWActor*);
|
||||||
int SetSumoFartQuake(DSWActor*);
|
int SetSumoFartQuake(DSWActor*);
|
||||||
|
|
||||||
|
|
|
@ -269,9 +269,9 @@ SetQuake(PLAYERp pp, short tics, short amt)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SetExpQuake(int16_t Weapon)
|
SetExpQuake(DSWActor* actor)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[Weapon];
|
SPRITEp sp = &actor->s();
|
||||||
|
|
||||||
SpawnQuake(sp->sectnum, sp->x, sp->y, sp->z, 40, 4, 20000); // !JIM! was 8, 40000
|
SpawnQuake(sp->sectnum, sp->x, sp->y, sp->z, 40, 4, 20000); // !JIM! was 8, 40000
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -296,9 +296,9 @@ SetPlayerQuake(PLAYERp pp)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SetNuclearQuake(int16_t Weapon)
|
SetNuclearQuake(DSWActor* actor)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[Weapon];
|
SPRITEp sp = &actor->s();
|
||||||
|
|
||||||
SpawnQuake(sp->sectnum, sp->x, sp->y, sp->z, 400, 8, 64000);
|
SpawnQuake(sp->sectnum, sp->x, sp->y, sp->z, 400, 8, 64000);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -6322,7 +6322,7 @@ KeyMain:
|
||||||
nu->sz = SPRITEp_MID(&sprite[pp->PlayerSprite]); // Set mid way up who it hit
|
nu->sz = SPRITEp_MID(&sprite[pp->PlayerSprite]); // Set mid way up who it hit
|
||||||
nu->spal = np->pal = sp->pal; // Set the palette of the flag
|
nu->spal = np->pal = sp->pal; // Set the palette of the flag
|
||||||
|
|
||||||
SetOwner(pp->PlayerSprite,New); // Player now owns the flag
|
SetOwner(pp->Actor(), actorNew); // Player now owns the flag
|
||||||
nu->flagOwnerActor = actor; // Tell carried flag who owns it
|
nu->flagOwnerActor = actor; // Tell carried flag who owns it
|
||||||
KillGet(SpriteNum); // Set up for flag respawning
|
KillGet(SpriteNum); // Set up for flag respawning
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1032,7 +1032,6 @@ SetupSectorObject(short sectnum, short tag)
|
||||||
SECTOR_OBJECTp sop;
|
SECTOR_OBJECTp sop;
|
||||||
int object_num;
|
int object_num;
|
||||||
short j;
|
short j;
|
||||||
short New;
|
|
||||||
USERp u;
|
USERp u;
|
||||||
|
|
||||||
tag -= (TAG_OBJECT_CENTER - 1);
|
tag -= (TAG_OBJECT_CENTER - 1);
|
||||||
|
|
|
@ -116,7 +116,7 @@ int DoBlurExtend(int16_t Weapon,int16_t interval,int16_t blur_num);
|
||||||
int SpawnDemonFist(DSWActor*);
|
int SpawnDemonFist(DSWActor*);
|
||||||
void SpawnTankShellExp(DSWActor*);
|
void SpawnTankShellExp(DSWActor*);
|
||||||
void SpawnMicroExp(DSWActor*);
|
void SpawnMicroExp(DSWActor*);
|
||||||
void SpawnExpZadjust(short Weapon, SPRITEp exp, int upper_zsize, int lower_zsize);
|
void SpawnExpZadjust(DSWActor* actor, DSWActor* expActor, int upper_zsize, int lower_zsize);
|
||||||
int BulletHitSprite(DSWActor* actor, DSWActor* hitActor, int hit_x, int hit_y, int hit_z, short ID);
|
int BulletHitSprite(DSWActor* actor, DSWActor* hitActor, int hit_x, int hit_y, int hit_z, short ID);
|
||||||
int SpawnSplashXY(int hit_x,int hit_y,int hit_z,int);
|
int SpawnSplashXY(int hit_x,int hit_y,int hit_z,int);
|
||||||
DSWActor* SpawnBoatSparks(PLAYERp pp,short hit_sect,short hit_wall,int hit_x,int hit_y,int hit_z,short hit_ang);
|
DSWActor* SpawnBoatSparks(PLAYERp pp,short hit_sect,short hit_wall,int hit_x,int hit_y,int hit_z,short hit_ang);
|
||||||
|
@ -10288,7 +10288,7 @@ int DoElectro(DSWActor* actor)
|
||||||
if (TEST(u->Flags, SPR_SUICIDE))
|
if (TEST(u->Flags, SPR_SUICIDE))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (u->ret)
|
if (u->coll.type != kHitNone)
|
||||||
{
|
{
|
||||||
if (WeaponMoveHit(actor->GetSpriteIndex()))
|
if (WeaponMoveHit(actor->GetSpriteIndex()))
|
||||||
{
|
{
|
||||||
|
@ -10331,7 +10331,7 @@ int DoLavaBoulder(DSWActor* actor)
|
||||||
if (TEST(u->Flags, SPR_SUICIDE))
|
if (TEST(u->Flags, SPR_SUICIDE))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (u->ret)
|
if (u->coll.type != kHitNone)
|
||||||
{
|
{
|
||||||
if (WeaponMoveHit(actor->GetSpriteIndex()))
|
if (WeaponMoveHit(actor->GetSpriteIndex()))
|
||||||
{
|
{
|
||||||
|
@ -10359,7 +10359,7 @@ int DoSpear(DSWActor* actor)
|
||||||
if (TEST(u->Flags, SPR_SUICIDE))
|
if (TEST(u->Flags, SPR_SUICIDE))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (u->ret)
|
if (u->coll.type != kHitNone)
|
||||||
{
|
{
|
||||||
if (WeaponMoveHit(actor->GetSpriteIndex()))
|
if (WeaponMoveHit(actor->GetSpriteIndex()))
|
||||||
{
|
{
|
||||||
|
@ -10633,7 +10633,7 @@ void SpawnFireballExp(DSWActor* actor)
|
||||||
// ceilings
|
// ceilings
|
||||||
//
|
//
|
||||||
|
|
||||||
SpawnExpZadjust(actor->GetSpriteIndex(), exp, Z(15), Z(15));
|
SpawnExpZadjust(actor, actorNew, Z(15), Z(15));
|
||||||
|
|
||||||
if (RANDOM_P2(1024) < 150)
|
if (RANDOM_P2(1024) < 150)
|
||||||
SpawnFireballFlames(actorNew, nullptr);
|
SpawnFireballFlames(actorNew, nullptr);
|
||||||
|
@ -10672,7 +10672,7 @@ void SpawnGoroFireballExp(DSWActor* actor)
|
||||||
// ceilings
|
// ceilings
|
||||||
//
|
//
|
||||||
|
|
||||||
SpawnExpZadjust(actor->GetSpriteIndex(), exp, Z(15), Z(15));
|
SpawnExpZadjust(actor, actorNew, Z(15), Z(15));
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpawnBoltExp(DSWActor* actor)
|
void SpawnBoltExp(DSWActor* actor)
|
||||||
|
@ -10705,11 +10705,11 @@ void SpawnBoltExp(DSWActor* actor)
|
||||||
SET(exp->cstat, CSTAT_SPRITE_XFLIP);
|
SET(exp->cstat, CSTAT_SPRITE_XFLIP);
|
||||||
eu->Radius = DamageData[DMG_BOLT_EXP].radius;
|
eu->Radius = DamageData[DMG_BOLT_EXP].radius;
|
||||||
|
|
||||||
SpawnExpZadjust(actor->GetSpriteIndex(), exp, Z(40), Z(40));
|
SpawnExpZadjust(actor, expActor, Z(40), Z(40));
|
||||||
|
|
||||||
DoExpDamageTest(expActor);
|
DoExpDamageTest(expActor);
|
||||||
|
|
||||||
SetExpQuake(actor->GetSpriteIndex()); // !JIM! made rocket launcher shake things
|
SetExpQuake(actor); // !JIM! made rocket launcher shake things
|
||||||
SpawnVis(nullptr, exp->sectnum, exp->x, exp->y, exp->z, 16);
|
SpawnVis(nullptr, exp->sectnum, exp->x, exp->y, exp->z, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10764,7 +10764,7 @@ void SpawnTankShellExp(DSWActor* actor)
|
||||||
SET(exp->cstat, CSTAT_SPRITE_XFLIP);
|
SET(exp->cstat, CSTAT_SPRITE_XFLIP);
|
||||||
eu->Radius = DamageData[DMG_TANK_SHELL_EXP].radius;
|
eu->Radius = DamageData[DMG_TANK_SHELL_EXP].radius;
|
||||||
|
|
||||||
SpawnExpZadjust(actor->GetSpriteIndex(), exp, Z(40), Z(40));
|
SpawnExpZadjust(actor, expActor, Z(40), Z(40));
|
||||||
DoExpDamageTest(expActor);
|
DoExpDamageTest(expActor);
|
||||||
SpawnVis(nullptr, exp->sectnum, exp->x, exp->y, exp->z, 16);
|
SpawnVis(nullptr, exp->sectnum, exp->x, exp->y, exp->z, 16);
|
||||||
}
|
}
|
||||||
|
@ -10809,7 +10809,7 @@ void SpawnNuclearSecondaryExp(DSWActor* actor, short ang)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SpawnExpZadjust(actor->GetSpriteIndex(), exp, Z(50), Z(10));
|
SpawnExpZadjust(actor, expActor, Z(50), Z(10));
|
||||||
InitChemBomb(expActor);
|
InitChemBomb(expActor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10879,12 +10879,12 @@ void SpawnNuclearExp(DSWActor* actor)
|
||||||
|
|
||||||
eu->Radius = NUKE_RADIUS;
|
eu->Radius = NUKE_RADIUS;
|
||||||
|
|
||||||
SpawnExpZadjust(actor->GetSpriteIndex(), exp, Z(30), Z(30));
|
SpawnExpZadjust(actor, expActor, Z(30), Z(30));
|
||||||
|
|
||||||
DoExpDamageTest(expActor);
|
DoExpDamageTest(expActor);
|
||||||
|
|
||||||
// Nuclear effects
|
// Nuclear effects
|
||||||
SetNuclearQuake(actor->GetSpriteIndex());
|
SetNuclearQuake(actor);
|
||||||
|
|
||||||
SetFadeAmt(pp, -80, 1); // Nuclear flash
|
SetFadeAmt(pp, -80, 1); // Nuclear flash
|
||||||
|
|
||||||
|
@ -10975,7 +10975,7 @@ void SpawnMicroExp(DSWActor* actor)
|
||||||
// ceilings
|
// ceilings
|
||||||
//
|
//
|
||||||
|
|
||||||
SpawnExpZadjust(actor->GetSpriteIndex(), exp, Z(20), Z(20));
|
SpawnExpZadjust(actor, expActor, Z(20), Z(20));
|
||||||
SpawnVis(nullptr, exp->sectnum, exp->x, exp->y, exp->z, 16);
|
SpawnVis(nullptr, exp->sectnum, exp->x, exp->y, exp->z, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11119,7 +11119,7 @@ void SpawnGrenadeSecondaryExp(DSWActor* actor, int ang)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SpawnExpZadjust(actor->GetSpriteIndex(), exp, Z(50), Z(10));
|
SpawnExpZadjust(actor, expActor, Z(50), Z(10));
|
||||||
exp->backuppos();
|
exp->backuppos();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11185,20 +11185,20 @@ void SpawnGrenadeExp(DSWActor* actor)
|
||||||
// ceilings
|
// ceilings
|
||||||
//
|
//
|
||||||
|
|
||||||
SpawnExpZadjust(actor->GetSpriteIndex(), exp, Z(100), Z(30));
|
SpawnExpZadjust(actor, expActor, Z(100), Z(30));
|
||||||
|
|
||||||
DoExpDamageTest(expActor);
|
DoExpDamageTest(expActor);
|
||||||
|
|
||||||
SetExpQuake(expActor->GetSpriteIndex());
|
SetExpQuake(expActor);
|
||||||
SpawnVis(nullptr, exp->sectnum, exp->x, exp->y, exp->z, 0);
|
SpawnVis(nullptr, exp->sectnum, exp->x, exp->y, exp->z, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpawnExpZadjust(short Weapon, SPRITEp exp, int upper_zsize, int lower_zsize)
|
void SpawnExpZadjust(DSWActor* actor, DSWActor* expActor, int upper_zsize, int lower_zsize)
|
||||||
{
|
{
|
||||||
auto actor = &swActors[Weapon];
|
|
||||||
USERp u = actor->u();
|
USERp u = actor->u();
|
||||||
USERp eu = User[exp - sprite].Data();
|
USERp eu = expActor->u();
|
||||||
int tos_z, bos_z;
|
int tos_z, bos_z;
|
||||||
|
auto exp = &expActor->s();
|
||||||
|
|
||||||
ASSERT(eu);
|
ASSERT(eu);
|
||||||
|
|
||||||
|
@ -11274,10 +11274,10 @@ void SpawnMineExp(DSWActor* actor)
|
||||||
// ceilings
|
// ceilings
|
||||||
//
|
//
|
||||||
|
|
||||||
SpawnExpZadjust(actor->GetSpriteIndex(), exp, Z(100), Z(20));
|
SpawnExpZadjust(actor, expActor, Z(100), Z(20));
|
||||||
SpawnVis(nullptr, exp->sectnum, exp->x, exp->y, exp->z, 16);
|
SpawnVis(nullptr, exp->sectnum, exp->x, exp->y, exp->z, 16);
|
||||||
|
|
||||||
SetExpQuake(expActor->GetSpriteIndex());
|
SetExpQuake(expActor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -11327,7 +11327,7 @@ DSWActor* SpawnSectorExp(DSWActor* actor)
|
||||||
eu->Radius = DamageData[DMG_SECTOR_EXP].radius;
|
eu->Radius = DamageData[DMG_SECTOR_EXP].radius;
|
||||||
|
|
||||||
DoExpDamageTest(expActor);
|
DoExpDamageTest(expActor);
|
||||||
SetExpQuake(expActor->GetSpriteIndex());
|
SetExpQuake(expActor);
|
||||||
SpawnVis(nullptr, exp->sectnum, exp->x, exp->y, exp->z, 16);
|
SpawnVis(nullptr, exp->sectnum, exp->x, exp->y, exp->z, 16);
|
||||||
|
|
||||||
return expActor;
|
return expActor;
|
||||||
|
@ -11356,11 +11356,11 @@ DSWActor* SpawnLargeExp(DSWActor* actor)
|
||||||
RESET(exp->cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
|
RESET(exp->cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||||
eu->Radius = DamageData[DMG_SECTOR_EXP].radius;
|
eu->Radius = DamageData[DMG_SECTOR_EXP].radius;
|
||||||
|
|
||||||
SpawnExpZadjust(actor->GetSpriteIndex(), exp, Z(50), Z(50));
|
SpawnExpZadjust(actor, expActor, Z(50), Z(50));
|
||||||
|
|
||||||
// Should not cause other sectors to explode
|
// Should not cause other sectors to explode
|
||||||
DoExpDamageTest(expActor);
|
DoExpDamageTest(expActor);
|
||||||
SetExpQuake(expActor->GetSpriteIndex());
|
SetExpQuake(expActor);
|
||||||
SpawnVis(nullptr, exp->sectnum, exp->x, exp->y, exp->z, 16);
|
SpawnVis(nullptr, exp->sectnum, exp->x, exp->y, exp->z, 16);
|
||||||
|
|
||||||
return expActor;
|
return expActor;
|
||||||
|
@ -11457,7 +11457,7 @@ int DoFireball(DSWActor* actor)
|
||||||
|
|
||||||
MissileHitDiveArea(actor);
|
MissileHitDiveArea(actor);
|
||||||
|
|
||||||
if (u->ret)
|
if (u->coll.type != kHitNone)
|
||||||
{
|
{
|
||||||
bool hit_burn = false;
|
bool hit_burn = false;
|
||||||
|
|
||||||
|
@ -11706,7 +11706,7 @@ int DoNapalm(DSWActor* actor)
|
||||||
ASSERT(eu->Tics == 0);
|
ASSERT(eu->Tics == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (u->ret)
|
if (u->coll.type != kHitNone)
|
||||||
{
|
{
|
||||||
if (WeaponMoveHit(actor->GetSpriteIndex()))
|
if (WeaponMoveHit(actor->GetSpriteIndex()))
|
||||||
{
|
{
|
||||||
|
@ -11730,7 +11730,7 @@ int DoBloodWorm(DSWActor* actor)
|
||||||
|
|
||||||
SetCollision(u, move_ground_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
SetCollision(u, move_ground_missile(actor->GetSpriteIndex(), u->xchange, u->ychange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS));
|
||||||
|
|
||||||
if (u->ret)
|
if (u->coll.type != kHitNone)
|
||||||
{
|
{
|
||||||
u->xchange = -u->xchange;
|
u->xchange = -u->xchange;
|
||||||
u->ychange = -u->ychange;
|
u->ychange = -u->ychange;
|
||||||
|
@ -11947,7 +11947,7 @@ int DoMirv(DSWActor* actor)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (u->ret)
|
if (u->coll.type != kHitNone)
|
||||||
{
|
{
|
||||||
SpawnMeteorExp(actor);
|
SpawnMeteorExp(actor);
|
||||||
KillActor(actor);
|
KillActor(actor);
|
||||||
|
|
Loading…
Reference in a new issue