- Converted ExplosiveBarrel, BulletPuff and DoomUnusedStates to DECORATE.
- Added VSpeed DECORATE property so that an actor can be given an initial vertical speed. - Removed the barrel check in P_DamageMobj. AActor::Die is doing the same operation unconditionally so this is redundant. - Added A_BarrelDestroy to the list of DECORATE code pointers so that the same effect can be recreated for other items as well. - Renamed A_BarrelRespawn to A_Respawn, changed it so that it works for monsters and added it to the list of DECORATE code pointers. Now Quake-style zombies should be possible. ;) - Changed handling of MF4_RANDOMIZE so that it applies to all actors being spawned and not just projectiles. - Converted Berserk and Megasphere to DECORATE. - Fixed: HealThing should respect the stamina a player has and the Dehacked health compatibility flag if max is 0. To do that it calls P_GiveBody now. SVN r373 (trunk)
This commit is contained in:
parent
c745c635db
commit
29195a913c
25 changed files with 819 additions and 859 deletions
|
|
@ -369,7 +369,7 @@ void A_BulletAttack (AActor *self)
|
|||
int angle = bangle + (pr_cabullet.Random2() << 20);
|
||||
int damage = ((pr_cabullet()%5)+1)*3;
|
||||
P_LineAttack(self, angle, MISSILERANGE, slope, damage,
|
||||
GetDefaultByType(RUNTIME_CLASS(ABulletPuff))->DamageType, RUNTIME_CLASS(ABulletPuff));
|
||||
NAME_None, NAME_BulletPuff);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -752,7 +752,7 @@ void A_CustomBulletAttack (AActor *self)
|
|||
bangle = self->angle;
|
||||
|
||||
pufftype = PClass::FindClass(PuffType);
|
||||
if (!pufftype) pufftype=RUNTIME_CLASS(ABulletPuff);
|
||||
if (!pufftype) pufftype = PClass::FindClass(NAME_BulletPuff);
|
||||
|
||||
bslope = P_AimLineAttack (self, bangle, MISSILERANGE);
|
||||
|
||||
|
|
@ -855,7 +855,7 @@ void A_FireBullets (AActor *self)
|
|||
bslope = bulletpitch;
|
||||
|
||||
PuffType = PClass::FindClass(PuffTypeName);
|
||||
if (!PuffType) PuffType=RUNTIME_CLASS(ABulletPuff);
|
||||
if (!PuffType) PuffType = PClass::FindClass(NAME_BulletPuff);
|
||||
|
||||
S_SoundID (self, CHAN_WEAPON, weapon->AttackSound, 1, ATTN_NORM);
|
||||
|
||||
|
|
@ -977,7 +977,7 @@ void A_CustomPunch (AActor *self)
|
|||
}
|
||||
|
||||
PuffType = PClass::FindClass(PuffTypeName);
|
||||
if (!PuffType) PuffType=RUNTIME_CLASS(ABulletPuff);
|
||||
if (!PuffType) PuffType = PClass::FindClass(NAME_BulletPuff);
|
||||
|
||||
P_LineAttack (self, angle, Range, pitch, Damage, GetDefaultByType(PuffType)->DamageType, PuffType);
|
||||
|
||||
|
|
@ -1383,6 +1383,7 @@ void A_SelectWeapon(AActor * actor)
|
|||
else if (pStateCall != NULL) pStateCall->Result=false;
|
||||
}
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// A_Print
|
||||
|
|
@ -1782,3 +1783,44 @@ void A_Stop (AActor *self)
|
|||
{
|
||||
self->momx = self->momy = self->momz = 0;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// A_Respawn
|
||||
//
|
||||
//===========================================================================
|
||||
void A_Respawn (AActor *actor)
|
||||
{
|
||||
fixed_t x = actor->SpawnPoint[0] << FRACBITS;
|
||||
fixed_t y = actor->SpawnPoint[1] << FRACBITS;
|
||||
sector_t *sec;
|
||||
|
||||
actor->flags |= MF_SOLID;
|
||||
sec = R_PointInSubsector (x, y)->sector;
|
||||
actor->SetOrigin (x, y, sec->floorplane.ZatPoint (x, y));
|
||||
actor->height = actor->GetDefault()->height;
|
||||
if (P_TestMobjLocation (actor))
|
||||
{
|
||||
AActor *defs = actor->GetDefault();
|
||||
actor->health = defs->health;
|
||||
|
||||
actor->flags = (defs->flags & ~MF_FRIENDLY) | (actor->flags & MF_FRIENDLY);
|
||||
actor->flags2 = defs->flags2;
|
||||
actor->flags3 = (defs->flags3 & ~(MF3_NOSIGHTCHECK | MF3_HUNTPLAYERS)) | (actor->flags3 & (MF3_NOSIGHTCHECK | MF3_HUNTPLAYERS));
|
||||
actor->flags4 = (defs->flags4 & ~MF4_NOHATEPLAYERS) | (actor->flags4 & MF4_NOHATEPLAYERS);
|
||||
actor->flags5 = defs->flags5;
|
||||
actor->SetState (actor->SpawnState);
|
||||
actor->renderflags &= ~RF_INVISIBLE;
|
||||
|
||||
int index=CheckIndex(1, NULL);
|
||||
if (index<0 || EvalExpressionN (StateParameters[index+2], actor))
|
||||
{
|
||||
Spawn<ATeleportFog> (x, y, actor->z + TELEFOGHEIGHT, ALLOW_REPLACE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
actor->flags &= ~MF_SOLID;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue