mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 06:42:08 +00:00
- Reintroduced damage thrust clamping but with a higher threshold. The clamping
is now also done in floating point before any fixed point overflows can occur. SVN r1670 (trunk)
This commit is contained in:
parent
d8bb215e70
commit
db0a924fc9
6 changed files with 13 additions and 13 deletions
|
@ -1,4 +1,8 @@
|
|||
June 14, 2009 (Changes by Graf Zahl)
|
||||
June 16, 2009 (Changes by Graf Zahl)
|
||||
- Reintroduced damage thrust clamping but with a higher threshold. The clamping
|
||||
is now also done in floating point before any fixed point overflows can occur.
|
||||
|
||||
June 14, 2009 (Changes by Graf Zahl)
|
||||
- added a compatibility option to restore the original Heretic bug where
|
||||
a Minotaur couldn't spawn floor flames when standing in water having its
|
||||
feet clipped.
|
||||
|
|
|
@ -442,7 +442,7 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
// a very very cheap kill.
|
||||
P_LineAttack (player->mo, player->mo->angle, PLAYERMISSILERANGE,
|
||||
P_AimLineAttack (player->mo, player->mo->angle, PLAYERMISSILERANGE), 1000000,
|
||||
NAME_None, NAME_BulletPuff);
|
||||
NAME_MDK, NAME_BulletPuff);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -235,6 +235,7 @@ xx(PoisonCloud) // makes monsters howl.
|
|||
// Special death name for getting killed excessively. Could be used as
|
||||
// a damage type if you wanted to force an extreme death.
|
||||
xx(Extreme)
|
||||
xx(MDK)
|
||||
|
||||
// Special names for thingdef_exp.cpp
|
||||
xx(Random)
|
||||
|
|
|
@ -1043,16 +1043,10 @@ void P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage
|
|||
|
||||
// Calculate this as float to avoid overflows so that the
|
||||
// clamping that had to be done here can be removed.
|
||||
thrust = FLOAT2FIXED((damage * 0.125 * kickback) / target->Mass);
|
||||
double fltthrust = clamp((damage * 0.125 * kickback) / target->Mass, 0.,mod == NAME_MDK? 10. : 32.);
|
||||
|
||||
thrust = FLOAT2FIXED(fltthrust);
|
||||
|
||||
// [RH] If thrust overflows, use a more reasonable amount
|
||||
/* old fixed point code that could overflow.
|
||||
thrust = damage*(FRACUNIT>>3)*kickback / target->Mass;
|
||||
if (thrust < 0 || thrust > 10*FRACUNIT)
|
||||
{
|
||||
thrust = 10*FRACUNIT;
|
||||
}
|
||||
*/
|
||||
// make fall forwards sometimes
|
||||
if ((damage < 40) && (damage > target->health)
|
||||
&& (target->z - origin->z > 64*FRACUNIT)
|
||||
|
|
|
@ -4520,6 +4520,7 @@ bool P_HitWater (AActor * thing, sector_t * sec, fixed_t x, fixed_t y, fixed_t z
|
|||
AActor *mo = NULL;
|
||||
FSplashDef *splash;
|
||||
int terrainnum;
|
||||
sector_t *hsec = NULL;
|
||||
|
||||
if (x == FIXED_MIN) x = thing->x;
|
||||
if (y == FIXED_MIN) y = thing->y;
|
||||
|
@ -4545,7 +4546,7 @@ bool P_HitWater (AActor * thing, sector_t * sec, fixed_t x, fixed_t y, fixed_t z
|
|||
if (planez < z) return false;
|
||||
}
|
||||
#endif
|
||||
sector_t *hsec = sec->GetHeightSec();
|
||||
hsec = sec->GetHeightSec();
|
||||
if (hsec == NULL || !(hsec->MoreFlags & SECF_CLIPFAKEPLANES))
|
||||
{
|
||||
terrainnum = TerrainTypes[sec->GetTexture(sector_t::floor)];
|
||||
|
|
|
@ -217,7 +217,7 @@ int FWadCollection::AddExternalFile(const char *filename)
|
|||
FWadCollection::LumpRecord *lumprec = &LumpInfo[LumpInfo.Reserve(1)];
|
||||
lumprec->lump = lump;
|
||||
lumprec->wadnum = -1;
|
||||
return 0; // later
|
||||
return LumpInfo.Size()-1; // later
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
Loading…
Reference in a new issue