opps, breabable fix

This commit is contained in:
Scott Brooks 2002-04-20 23:54:55 +00:00
parent 51acdb155a
commit a9a3842951
2 changed files with 15 additions and 6 deletions

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.60 2002/04/20 23:54:55 blaze
// opps, breabable fix
//
// Revision 1.59 2002/04/07 03:22:48 jbravo // Revision 1.59 2002/04/07 03:22:48 jbravo
// Tweaks and crashbug fixes // Tweaks and crashbug fixes
// //
@ -1475,8 +1478,7 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker,
{ {
if (!targ->unbreakable) if (!targ->unbreakable)
{ {
targ->health -= damage;
targ->health -= damage;
} }
G_BreakGlass( targ, inflictor, attacker, point, mod, damage ); G_BreakGlass( targ, inflictor, attacker, point, mod, damage );
return; return;

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.30 2002/04/20 23:54:55 blaze
// opps, breabable fix
//
// Revision 1.29 2002/04/08 20:14:34 blaze // Revision 1.29 2002/04/08 20:14:34 blaze
// func_breakable explode fix // func_breakable explode fix
// //
@ -502,8 +505,11 @@ void SP_func_breakable( gentity_t *ent ) {
// Setup health of breakable // Setup health of breakable
G_SpawnInt( "health", "0", &health ); G_SpawnInt( "health", "0", &health );
if( health <= 0 ) health = 5; if( health <= 0 )
{
health = 5;
}
G_Printf("Setting health to %d\n",health);
G_SpawnInt("damage","170", &damage); G_SpawnInt("damage","170", &damage);
ent->damage = damage; ent->damage = damage;
@ -706,6 +712,9 @@ void G_BreakGlass( gentity_t *ent, gentity_t *inflictor, gentity_t *attacker, ve
//Elder: use TempEntity2 to stuff params //Elder: use TempEntity2 to stuff params
//tent = G_TempEntity( center, EV_BREAK_GLASS ); //tent = G_TempEntity( center, EV_BREAK_GLASS );
//tent->s.eventParm = eParm; //tent->s.eventParm = eParm;
//unlink it instead of freeing
trap_UnlinkEntity(ent);
} }
else if(ent->chippable) else if(ent->chippable)
{ {
@ -756,8 +765,6 @@ void G_BreakGlass( gentity_t *ent, gentity_t *inflictor, gentity_t *attacker, ve
tent = G_TempEntity2( impactPoint, EV_CHIP_GLASS, eParm); tent = G_TempEntity2( impactPoint, EV_CHIP_GLASS, eParm);
} }
//unlink it instead of freeing
trap_UnlinkEntity(ent);
} }