- Fixed: The StrifePlayer couldn't obtain his default inventory because

APlayerPawn::GiveDefaultInventory gave him some HexenArmor even though
  he doesn't need it.
- Added custom blood type properties to DECORATE.
- Converted Blood to DECORATE and made some minor changes to the code
  in preparation for custom blood types.
- Converted the bot helper things to DECORATE.
- Added damage type specific crash states.


SVN r395 (trunk)
This commit is contained in:
Christoph Oelckers 2006-11-29 10:03:35 +00:00
commit 0ba809234e
20 changed files with 337 additions and 215 deletions

View file

@ -3010,7 +3010,7 @@ static bool ProcessRailHit (FTraceResults &res)
return true;
}
void P_RailAttack (AActor *source, int damage, int offset, int color1, int color2, float maxdiff, bool silent)
void P_RailAttack (AActor *source, int damage, int offset, int color1, int color2, float maxdiff, bool silent, FName puff)
{
fixed_t vx, vy, vz;
angle_t angle, pitch;
@ -3080,11 +3080,11 @@ void P_RailAttack (AActor *source, int damage, int offset, int color1, int color
}
if (trace.CrossedWater)
{
AActor *puff = Spawn ("BulletPuff", 0, 0, 0, ALLOW_REPLACE);
if (puff != NULL)
AActor *thepuff = Spawn ("BulletPuff", 0, 0, 0, ALLOW_REPLACE);
if (thepuff != NULL)
{
SpawnDeepSplash (source, trace, puff, vx, vy, vz);
puff->Destroy ();
SpawnDeepSplash (source, trace, thepuff, vx, vy, vz);
thepuff->Destroy ();
}
}
@ -3102,7 +3102,8 @@ void P_RailAttack (AActor *source, int damage, int offset, int color1, int color
if ((RailHits[i].HitActor->flags & MF_NOBLOOD) ||
(RailHits[i].HitActor->flags2 & (MF2_DORMANT|MF2_INVULNERABLE)))
{
P_SpawnPuff (PClass::FindClass(NAME_BulletPuff), x, y, z, source->angle - ANG180, 1, true);
const PClass *puffclass = PClass::FindClass(puff);
if (puffclass != NULL) P_SpawnPuff (puffclass, x, y, z, source->angle - ANG180, 1, true);
}
else
{
@ -3939,18 +3940,22 @@ void P_DoCrunch (AActor *thing)
(!(thing->flags2&(MF2_INVULNERABLE|MF2_DORMANT))))
{
PalEntry bloodcolor = (PalEntry)thing->GetClass()->Meta.GetMetaInt(AMETA_BloodColor);
const PClass *bloodcls = PClass::FindClass((ENamedName)thing->GetClass()->Meta.GetMetaInt(AMETA_BloodType, NAME_Blood));
P_TraceBleed (crushchange, thing);
if (cl_bloodtype <= 1)
if (cl_bloodtype <= 1 && bloodcls != NULL)
{
AActor *mo;
mo = Spawn<ABlood> (thing->x, thing->y,
mo = Spawn (bloodcls, thing->x, thing->y,
thing->z + thing->height/2, ALLOW_REPLACE);
mo->momx = pr_crunch.Random2 () << 12;
mo->momy = pr_crunch.Random2 () << 12;
if (bloodcolor!=0) mo->Translation = TRANSLATION(TRANSLATION_Blood, bloodcolor.a);
if (bloodcolor != 0 && !(mo->flags2 & MF2_DONTTRANSLATE))
{
mo->Translation = TRANSLATION(TRANSLATION_Blood, bloodcolor.a);
}
}
if (cl_bloodtype >= 1)
{