Merge branch 'master' into scripting

Conflicts:
	src/actor.h
	src/fragglescript/t_func.cpp
	src/g_doom/a_bossbrain.cpp
	src/g_doom/a_revenant.cpp
	src/g_heretic/a_hereticartifacts.cpp
	src/g_heretic/a_hereticweaps.cpp
	src/g_heretic/a_knight.cpp
	src/g_hexen/a_bishop.cpp
	src/g_hexen/a_clericholy.cpp
	src/g_hexen/a_dragon.cpp
	src/g_hexen/a_firedemon.cpp
	src/g_hexen/a_flechette.cpp
	src/g_hexen/a_heresiarch.cpp
	src/g_hexen/a_hexenspecialdecs.cpp
	src/g_hexen/a_iceguy.cpp
	src/g_hexen/a_korax.cpp
	src/g_hexen/a_magelightning.cpp
	src/g_hexen/a_serpent.cpp
	src/g_hexen/a_spike.cpp
	src/g_hexen/a_wraith.cpp
	src/g_raven/a_minotaur.cpp
	src/g_shared/a_bridge.cpp
	src/g_shared/a_pickups.cpp
	src/g_shared/a_randomspawner.cpp
	src/g_strife/a_alienspectres.cpp
	src/g_strife/a_crusader.cpp
	src/g_strife/a_entityboss.cpp
	src/g_strife/a_inquisitor.cpp
	src/g_strife/a_loremaster.cpp
	src/g_strife/a_programmer.cpp
	src/g_strife/a_sentinel.cpp
	src/g_strife/a_spectral.cpp
	src/g_strife/a_strifestuff.cpp
	src/g_strife/a_strifeweapons.cpp
	src/g_strife/a_thingstoblowup.cpp
	src/p_local.h
	src/r_utility.cpp
This commit is contained in:
Christoph Oelckers 2016-01-19 13:43:11 +01:00
commit bc63b70d88
93 changed files with 877 additions and 765 deletions

View file

@ -379,8 +379,8 @@ DEFINE_ACTION_FUNCTION(AActor, A_RocketInFlight)
AActor *trail;
S_Sound (self, CHAN_VOICE, "misc/missileinflight", 1, ATTN_NORM);
P_SpawnPuff (self, PClass::FindActor("MiniMissilePuff"), self->x, self->y, self->z, self->angle - ANGLE_180, 2, PF_HITTHING);
trail = Spawn("RocketTrail", self->x - self->velx, self->y - self->vely, self->z, ALLOW_REPLACE);
P_SpawnPuff (self, PClass::FindActor("MiniMissilePuff"), self->Pos(), self->angle - ANGLE_180, 2, PF_HITTHING);
trail = Spawn("RocketTrail", self->Vec3Offset(-self->velx, -self->vely, 0), ALLOW_REPLACE);
if (trail != NULL)
{
trail->velz = FRACUNIT;
@ -551,10 +551,10 @@ DEFINE_ACTION_FUNCTION(AActor, A_MaulerTorpedoWave)
self->angle += ANGLE_180;
// If the torpedo hit the ceiling, it should still spawn the wave
savedz = self->z;
if (wavedef && self->ceilingz - self->z < wavedef->height)
savedz = self->Z();
if (wavedef && self->ceilingz - self->Z() < wavedef->height)
{
self->z = self->ceilingz - wavedef->height;
self->SetZ(self->ceilingz - wavedef->height);
}
for (int i = 0; i < 80; ++i)
@ -562,13 +562,13 @@ DEFINE_ACTION_FUNCTION(AActor, A_MaulerTorpedoWave)
self->angle += ANGLE_45/10;
P_SpawnSubMissile (self, PClass::FindActor("MaulerTorpedoWave"), self->target);
}
self->z = savedz;
self->SetZ(savedz);
return 0;
}
AActor *P_SpawnSubMissile (AActor *source, PClassActor *type, AActor *target)
{
AActor *other = Spawn (type, source->x, source->y, source->z, ALLOW_REPLACE);
AActor *other = Spawn (type, source->Pos(), ALLOW_REPLACE);
if (other == NULL)
{
@ -660,20 +660,19 @@ DEFINE_ACTION_FUNCTION(AActor, A_Burnination)
yofs = -yofs;
}
fixed_t x = self->x + (xofs << FRACBITS);
fixed_t y = self->y + (yofs << FRACBITS);
sector_t * sector = P_PointInSector(x, y);
fixedvec2 pos = self->Vec2Offset(xofs << FRACBITS, yofs << FRACBITS);
sector_t * sector = P_PointInSector(pos.x, pos.y);
// The sector's floor is too high so spawn the flame elsewhere.
if (sector->floorplane.ZatPoint(x, y) > self->z + self->MaxStepHeight)
if (sector->floorplane.ZatPoint(pos.x, pos.y) > self->Z() + self->MaxStepHeight)
{
x = self->x;
y = self->y;
pos.x = self->X();
pos.y = self->Y();
}
AActor *drop = Spawn<APhosphorousFire> (
x, y,
self->z + 4*FRACUNIT, ALLOW_REPLACE);
pos.x, pos.y,
self->Z() + 4*FRACUNIT, ALLOW_REPLACE);
if (drop != NULL)
{
drop->velx = self->velx + ((pr_phburn.Random2 (7)) << FRACBITS);
@ -718,9 +717,9 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireGrenade)
if (grenadetype != NULL)
{
self->z += 32*FRACUNIT;
self->AddZ(32*FRACUNIT);
grenade = P_SpawnSubMissile (self, grenadetype, self);
self->z -= 32*FRACUNIT;
self->AddZ(-32*FRACUNIT);
if (grenade == NULL)
return 0;
@ -731,15 +730,20 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireGrenade)
grenade->velz = FixedMul (finetangent[FINEANGLES/4-(self->pitch>>ANGLETOFINESHIFT)], grenade->Speed) + 8*FRACUNIT;
fixedvec2 offset;
an = self->angle >> ANGLETOFINESHIFT;
tworadii = self->radius + grenade->radius;
grenade->x += FixedMul (finecosine[an], tworadii);
grenade->y += FixedMul (finesine[an], tworadii);
offset.x = FixedMul (finecosine[an], tworadii);
offset.y = FixedMul (finesine[an], tworadii);
an = self->angle + angleofs;
an >>= ANGLETOFINESHIFT;
grenade->x += FixedMul (finecosine[an], 15*FRACUNIT);
grenade->y += FixedMul (finesine[an], 15*FRACUNIT);
offset.x += FixedMul (finecosine[an], 15*FRACUNIT);
offset.y += FixedMul (finesine[an], 15*FRACUNIT);
fixedvec2 newpos = grenade->Vec2Offset(offset.x, offset.y);
grenade->SetOrigin(newpos.x, newpos.y, grenade->Z(), false);
}
return 0;
}
@ -985,7 +989,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireSigil1)
P_BulletSlope (self, &linetarget);
if (linetarget != NULL)
{
spot = Spawn("SpectralLightningSpot", linetarget->x, linetarget->y, linetarget->floorz, ALLOW_REPLACE);
spot = Spawn("SpectralLightningSpot", linetarget->X(), linetarget->Y(), linetarget->floorz, ALLOW_REPLACE);
if (spot != NULL)
{
spot->tracer = linetarget;
@ -993,7 +997,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireSigil1)
}
else
{
spot = Spawn("SpectralLightningSpot", self->x, self->y, self->z, ALLOW_REPLACE);
spot = Spawn("SpectralLightningSpot", self->Pos(), ALLOW_REPLACE);
if (spot != NULL)
{
spot->velx += 28 * finecosine[self->angle >> ANGLETOFINESHIFT];
@ -1057,7 +1061,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireSigil3)
spot = P_SpawnSubMissile (self, PClass::FindActor("SpectralLightningBall1"), self);
if (spot != NULL)
{
spot->z = self->z + 32*FRACUNIT;
spot->SetZ(self->Z() + 32*FRACUNIT);
}
}
self->angle -= (ANGLE_180/20)*10;