Update to ZDoom r2249:

- fixed: Explosions directly under a water surface would not hurt any actor directly above this surface.
- cleaned up P_CheckSight flag handling.
- Use normal texture animation for the main menu cursors. This required updating animations
  all the time and not just when inside a level.
- fixed: IDBEHOLD altered the item counter.
- fixed: P_SpawnMapThing always reduced the angular precision to 45 degrees.
- removed AngleIncrements because it's not really useful.
- fixed: Level redirection checked the wrong level.
- Fixed: ClearActorInventory used the wrong stack index to get its parameter.
- P_ZMovement() temporarily disables jumping after a landing. Don't do this if the jump
  timer is already running or for short falls (e.g. along the edges of slopes, since the
  slope floorz calculation is pretty crappy.)
- Keep all damage factors in the table, even those that are 1.0.
- 256 is a valid pain chance, so clamp to that, not 255.
- Fixed: TMap::DelKey failed if the key's main position was nil, because it tried checking
  for it at the "next" position, which is an invalid pointer in that case.
- Changed A_SetUserVar and A_SetUserArray so they affect the actor that called it, which
  is not necessarily "self". The only visible change from this should be that inventory items
  now set their own variables and not their owners'.
- added a CrushPainSound actor property for Strife.
- fixed memory leaks in SBARINFO and WAD loading code.
- added GetBloodColor and GetBloodType inline functions to AActor to wrap the GetMeta calls used for this.



git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@756 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
Christoph Oelckers 2010-03-27 07:46:42 +00:00
parent 1d6ab83e1a
commit 298f0d2e80
42 changed files with 258 additions and 192 deletions

View file

@ -3053,7 +3053,7 @@ void aim_t::AimTraverse (fixed_t startx, fixed_t starty, fixed_t endx, fixed_t e
if (crossedffloors)
{
// if 3D floors were in the way do an extra visibility check for safety
if (!P_CheckSight(shootthing, th, 1))
if (!P_CheckSight(shootthing, th, SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY))
{
// the thing can't be seen so we can safely exclude its range from our aiming field
if (thingtoppitch<toppitch)
@ -3588,7 +3588,7 @@ void P_TraceBleed (int damage, fixed_t x, fixed_t y, fixed_t z, AActor *actor, a
{
if (bleedtrace.HitType == TRACE_HitWall)
{
PalEntry bloodcolor = (PalEntry)actor->GetClass()->Meta.GetMetaInt(AMETA_BloodColor);
PalEntry bloodcolor = actor->GetBloodColor();
if (bloodcolor != 0)
{
bloodcolor.r>>=1; // the full color is too bright for blood decals
@ -4324,7 +4324,7 @@ void P_RadiusAttack (AActor *bombspot, AActor *bombsource, int bombdamage, int b
}
points *= thing->GetClass()->Meta.GetMetaFixed(AMETA_RDFactor, FRACUNIT)/(float)FRACUNIT;
if (points > 0.f && P_CheckSight (thing, bombspot, 1))
if (points > 0.f && P_CheckSight (thing, bombspot, SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY))
{ // OK to damage; target is in direct path
float velz;
float thrust;
@ -4382,7 +4382,7 @@ void P_RadiusAttack (AActor *bombspot, AActor *bombsource, int bombdamage, int b
if (dist >= bombdistance)
continue; // out of range
if (P_CheckSight (thing, bombspot, 1))
if (P_CheckSight (thing, bombspot, SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY))
{ // OK to damage; target is in direct path
dist = clamp<int>(dist - fulldamagedistance, 0, dist);
int damage = Scale (bombdamage, bombdistance-dist, bombdistance);
@ -4592,34 +4592,40 @@ void P_DoCrunch (AActor *thing, FChangePosition *cpos)
P_DamageMobj (thing, NULL, NULL, cpos->crushchange, NAME_Crush);
// spray blood in a random direction
if ((!(thing->flags&MF_NOBLOOD)) &&
(!(thing->flags2&(MF2_INVULNERABLE|MF2_DORMANT))))
if (!(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 (cpos->crushchange, thing);
if (cl_bloodtype <= 1 && bloodcls != NULL)
if (!(thing->flags&MF_NOBLOOD))
{
AActor *mo;
mo = Spawn (bloodcls, thing->x, thing->y,
thing->z + thing->height/2, ALLOW_REPLACE);
mo->velx = pr_crunch.Random2 () << 12;
mo->vely = pr_crunch.Random2 () << 12;
if (bloodcolor != 0 && !(mo->flags2 & MF2_DONTTRANSLATE))
PalEntry bloodcolor = thing->GetBloodColor();
const PClass *bloodcls = thing->GetBloodType();
P_TraceBleed (cpos->crushchange, thing);
if (cl_bloodtype <= 1 && bloodcls != NULL)
{
mo->Translation = TRANSLATION(TRANSLATION_Blood, bloodcolor.a);
AActor *mo;
mo = Spawn (bloodcls, thing->x, thing->y,
thing->z + thing->height/2, ALLOW_REPLACE);
mo->velx = pr_crunch.Random2 () << 12;
mo->vely = pr_crunch.Random2 () << 12;
if (bloodcolor != 0 && !(mo->flags2 & MF2_DONTTRANSLATE))
{
mo->Translation = TRANSLATION(TRANSLATION_Blood, bloodcolor.a);
}
}
if (cl_bloodtype >= 1)
{
angle_t an;
an = (M_Random () - 128) << 24;
P_DrawSplash2 (32, thing->x, thing->y,
thing->z + thing->height/2, an, 2, bloodcolor);
}
}
if (cl_bloodtype >= 1)
if (thing->CrushPainSound != 0 && !S_GetSoundPlayingInfo(thing, thing->CrushPainSound))
{
angle_t an;
an = (M_Random () - 128) << 24;
P_DrawSplash2 (32, thing->x, thing->y,
thing->z + thing->height/2, an, 2, bloodcolor);
S_Sound(thing, CHAN_VOICE, thing->CrushPainSound, 1.f, ATTN_NORM);
}
}
}