mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-31 13:10:39 +00:00
- FAF_Sector + SpawnQuake
This commit is contained in:
parent
98c3d57b73
commit
db95dc95d1
5 changed files with 10 additions and 31 deletions
|
@ -41,7 +41,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
|||
BEGIN_SW_NS
|
||||
|
||||
ANIMATOR InitActorRunToward;
|
||||
bool FAF_Sector(int sectnum);
|
||||
bool DropAhead(DSWActor* actor, int min_height);
|
||||
|
||||
ANIMATORp ChooseAction(DECISION decision[]);
|
||||
|
|
|
@ -2059,7 +2059,6 @@ void computergetinput(int snum,InputPacket *syn); // jplayer.c
|
|||
|
||||
void DrawOverlapRoom(int tx,int ty,int tz,fixed_t tq16ang,fixed_t tq16horiz,short tsectnum); // rooms.c
|
||||
void SetupMirrorTiles(void); // rooms.c
|
||||
bool FAF_Sector(int sectnum); // rooms.c
|
||||
bool FAF_Sector(sectortype* sectnum); // rooms.c
|
||||
int GetZadjustment(sectortype* sectnum,short hitag); // rooms.c
|
||||
|
||||
|
|
|
@ -462,7 +462,7 @@ int DoBloodSpray(DSWActor* actor)
|
|||
else
|
||||
{
|
||||
auto bsp = &bldActor->s();
|
||||
if (FAF_Sector(bsp->sectnum) || FAF_ConnectArea(bsp->sector()))
|
||||
if (FAF_Sector(bsp->sector()) || FAF_ConnectArea(bsp->sector()))
|
||||
{
|
||||
KillActor(actor);
|
||||
return 0;
|
||||
|
|
|
@ -233,11 +233,11 @@ void QuakeViewChange(PLAYERp pp, int *z_diff, int *x_diff, int *y_diff, short *a
|
|||
}
|
||||
}
|
||||
|
||||
void SpawnQuake(short sectnum, int x, int y, int z,
|
||||
void SpawnQuake(sectortype* sect, int x, int y, int z,
|
||||
short tics, short amt, int radius)
|
||||
{
|
||||
|
||||
auto actorNew = InsertActor(sectnum, STAT_QUAKE_ON);
|
||||
auto actorNew = InsertActor(sect, STAT_QUAKE_ON);
|
||||
auto sp = &actorNew->s();
|
||||
|
||||
sp->x = x;
|
||||
|
@ -259,7 +259,7 @@ void SpawnQuake(short sectnum, int x, int y, int z,
|
|||
bool
|
||||
SetQuake(PLAYERp pp, short tics, short amt)
|
||||
{
|
||||
SpawnQuake(pp->cursectnum, pp->posx, pp->posy, pp->posz, tics, amt, 30000);
|
||||
SpawnQuake(pp->cursector(), pp->posx, pp->posy, pp->posz, tics, amt, 30000);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -268,7 +268,7 @@ SetExpQuake(DSWActor* actor)
|
|||
{
|
||||
SPRITEp sp = &actor->s();
|
||||
|
||||
SpawnQuake(sp->sectnum, sp->x, sp->y, sp->z, 40, 4, 20000); // !JIM! was 8, 40000
|
||||
SpawnQuake(sp->sector(), sp->x, sp->y, sp->z, 40, 4, 20000); // !JIM! was 8, 40000
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -277,7 +277,7 @@ SetGunQuake(DSWActor* actor)
|
|||
{
|
||||
SPRITEp sp = &actor->s();
|
||||
|
||||
SpawnQuake(sp->sectnum, sp->x, sp->y, sp->z, 40, 8, 40000);
|
||||
SpawnQuake(sp->sector(), sp->x, sp->y, sp->z, 40, 8, 40000);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -285,7 +285,7 @@ SetGunQuake(DSWActor* actor)
|
|||
int
|
||||
SetPlayerQuake(PLAYERp pp)
|
||||
{
|
||||
SpawnQuake(pp->cursectnum, pp->posx, pp->posy, pp->posz, 40, 8, 40000);
|
||||
SpawnQuake(pp->cursector(), pp->posx, pp->posy, pp->posz, 40, 8, 40000);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -295,7 +295,7 @@ SetNuclearQuake(DSWActor* actor)
|
|||
{
|
||||
SPRITEp sp = &actor->s();
|
||||
|
||||
SpawnQuake(sp->sectnum, sp->x, sp->y, sp->z, 400, 8, 64000);
|
||||
SpawnQuake(sp->sector(), sp->x, sp->y, sp->z, 400, 8, 64000);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -303,7 +303,7 @@ int SetSumoQuake(DSWActor* actor)
|
|||
{
|
||||
SPRITEp sp = &actor->s();
|
||||
|
||||
SpawnQuake(sp->sectnum, sp->x, sp->y, sp->z, 120, 4, 20000);
|
||||
SpawnQuake(sp->sector(), sp->x, sp->y, sp->z, 120, 4, 20000);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -311,7 +311,7 @@ int SetSumoFartQuake(DSWActor* actor)
|
|||
{
|
||||
SPRITEp sp = &actor->s();
|
||||
|
||||
SpawnQuake(sp->sectnum, sp->x, sp->y, sp->z, 60, 4, 4000);
|
||||
SpawnQuake(sp->sector(), sp->x, sp->y, sp->z, 60, 4, 4000);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -81,25 +81,6 @@ DSWActor* InsertActor(int sectnum, int stat)
|
|||
return pActor;
|
||||
}
|
||||
|
||||
bool FAF_Sector(int sectnum)
|
||||
{
|
||||
SPRITEp sp;
|
||||
|
||||
SWSectIterator it(sectnum);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
sp = &actor->s();
|
||||
|
||||
if (sp->statnum == STAT_FAF &&
|
||||
(sp->hitag >= VIEW_LEVEL1 && sp->hitag <= VIEW_LEVEL6))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool FAF_Sector(sectortype* sectnum)
|
||||
{
|
||||
SPRITEp sp;
|
||||
|
|
Loading…
Reference in a new issue