diff --git a/reaction/game/g_local.h b/reaction/game/g_local.h index 8c2dead3..9a2b97a6 100644 --- a/reaction/game/g_local.h +++ b/reaction/game/g_local.h @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.88 2002/06/05 23:39:40 blaze +// unbreakables work properly. Though I already commited this. +// // Revision 1.87 2002/06/03 05:24:31 niceass // spectator changes // @@ -329,6 +332,8 @@ struct gentity_s { int last_move_time; int health; + //Blaze: hold the health so when we respawn it, the health is set properly + int health_saved; //Blaze: holds if we can "chip" off peices qboolean chippable; //true if we cant break it diff --git a/reaction/game/g_misc.c b/reaction/game/g_misc.c index 0606cc3e..a624c13a 100644 --- a/reaction/game/g_misc.c +++ b/reaction/game/g_misc.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.54 2002/06/05 23:39:40 blaze +// unbreakables work properly. Though I already commited this. +// // Revision 1.53 2002/06/03 00:40:25 blaze // some more breakables fixes(ssg chips) // @@ -738,6 +741,7 @@ void SP_func_breakable( gentity_t *ent ) { ent->s.eventParm = amount | (atoi(id) & 0x0FFF); ent->health = health; + ent->health_saved = health; ent->takedamage = qtrue; diff --git a/reaction/game/g_teamplay.c b/reaction/game/g_teamplay.c index 6b895ed9..ed05341b 100644 --- a/reaction/game/g_teamplay.c +++ b/reaction/game/g_teamplay.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.102 2002/06/05 23:39:40 blaze +// unbreakables work properly. Though I already commited this. +// // Revision 1.101 2002/06/04 07:20:48 niceass // no moreTKing in MM // @@ -860,9 +863,11 @@ void SpawnPlayers() if (ent != NULL && ent->classname != NULL && !strcmp(ent->classname, "func_breakable")) { //re-link all unlinked breakables trap_LinkEntity(ent); - ent->exploded = qfalse; - ent->takedamage = qtrue; - ent->s.eType = ET_BREAKABLE; + + ent->exploded = qfalse; + ent->takedamage = qtrue; + ent->s.eType = ET_BREAKABLE; + ent->health = ent->health_saved; } } }