- next round of refactoring.
This contains some advance work for handling line-to-line portals in A_PainShootSkull. This function is special because it performs a map check itself instead of using one of the common functions from p_map.cpp, like most of the rest of the game code.
This commit is contained in:
parent
b63eb391f7
commit
2b5e5b6bc3
8 changed files with 93 additions and 52 deletions
|
|
@ -55,9 +55,9 @@ DEFINE_ACTION_FUNCTION(AActor, A_BrainScream)
|
|||
{
|
||||
fixed_t x;
|
||||
|
||||
for (x = self->x - 196*FRACUNIT; x < self->x + 320*FRACUNIT; x += 8*FRACUNIT)
|
||||
for (x = self->X() - 196*FRACUNIT; x < self->X() + 320*FRACUNIT; x += 8*FRACUNIT)
|
||||
{
|
||||
BrainishExplosion (x, self->y - 320*FRACUNIT,
|
||||
BrainishExplosion (x, self->Y() - 320*FRACUNIT,
|
||||
128 + (pr_brainscream() << (FRACBITS + 1)));
|
||||
}
|
||||
S_Sound (self, CHAN_VOICE, "brain/death", 1, ATTN_NONE);
|
||||
|
|
@ -65,9 +65,9 @@ DEFINE_ACTION_FUNCTION(AActor, A_BrainScream)
|
|||
|
||||
DEFINE_ACTION_FUNCTION(AActor, A_BrainExplode)
|
||||
{
|
||||
fixed_t x = self->x + pr_brainexplode.Random2()*2048;
|
||||
fixed_t x = self->X() + pr_brainexplode.Random2()*2048;
|
||||
fixed_t z = 128 + pr_brainexplode()*2*FRACUNIT;
|
||||
BrainishExplosion (x, self->y, z);
|
||||
BrainishExplosion (x, self->Y(), z);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AActor, A_BrainDie)
|
||||
|
|
@ -140,11 +140,11 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_BrainSpit)
|
|||
}
|
||||
else if (abs(spit->vely) > abs(spit->velx))
|
||||
{
|
||||
spit->special2 = (targ->y - self->y) / spit->vely;
|
||||
spit->special2 = (targ->Y() - self->Y()) / spit->vely;
|
||||
}
|
||||
else
|
||||
{
|
||||
spit->special2 = (targ->x - self->x) / spit->velx;
|
||||
spit->special2 = (targ->X() - self->X()) / spit->velx;
|
||||
}
|
||||
// [GZ] Calculates when the projectile will have reached destination
|
||||
spit->special2 += level.maptime;
|
||||
|
|
@ -185,7 +185,7 @@ static void SpawnFly(AActor *self, const PClass *spawntype, FSoundID sound)
|
|||
|
||||
if (spawntype != NULL)
|
||||
{
|
||||
fog = Spawn (spawntype, targ->x, targ->y, targ->z, ALLOW_REPLACE);
|
||||
fog = Spawn (spawntype, targ->X(), targ->Y(), targ->Z(), ALLOW_REPLACE);
|
||||
if (fog != NULL) S_Sound (fog, CHAN_BODY, sound, 1, ATTN_NORM);
|
||||
}
|
||||
|
||||
|
|
@ -256,7 +256,7 @@ static void SpawnFly(AActor *self, const PClass *spawntype, FSoundID sound)
|
|||
spawntype = PClass::FindClass(SpawnName);
|
||||
if (spawntype != NULL)
|
||||
{
|
||||
newmobj = Spawn (spawntype, targ->x, targ->y, targ->z, ALLOW_REPLACE);
|
||||
newmobj = Spawn (spawntype, targ->X(), targ->Y(), targ->Z(), ALLOW_REPLACE);
|
||||
if (newmobj != NULL)
|
||||
{
|
||||
// Make the new monster hate what the boss eye hates
|
||||
|
|
@ -275,7 +275,7 @@ static void SpawnFly(AActor *self, const PClass *spawntype, FSoundID sound)
|
|||
if (!(newmobj->ObjectFlags & OF_EuthanizeMe))
|
||||
{
|
||||
// telefrag anything in this spot
|
||||
P_TeleportMove (newmobj, newmobj->x, newmobj->y, newmobj->z, true);
|
||||
P_TeleportMove (newmobj, newmobj->X(), newmobj->Y(), newmobj->Z(), true);
|
||||
}
|
||||
newmobj->flags4 |= MF4_BOSSSPAWNED;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue