From 85212005ba07b59f432d2ae4f789f9bec03f8dc9 Mon Sep 17 00:00:00 2001 From: Andrei Drexler Date: Mon, 8 Sep 2003 19:19:20 +0000 Subject: [PATCH] New code for respawning entities in TP --- reaction/game/g_items.c | 83 ++++++++++++++++++++++++++---- reaction/game/g_local.h | 10 ++++ reaction/game/g_misc.c | 41 +++++++++++++-- reaction/game/g_mover.c | 97 +++++++++++++++++++++++++++-------- reaction/game/g_spawn.c | 33 +++++++----- reaction/game/g_target.c | 26 +++++++++- reaction/game/g_teamplay.c | 61 ++++------------------ reaction/game/g_trigger.c | 18 +++++++ reaction/game/game.plg | 102 ------------------------------------- 9 files changed, 268 insertions(+), 203 deletions(-) diff --git a/reaction/game/g_items.c b/reaction/game/g_items.c index 14589ae6..c35bfee4 100644 --- a/reaction/game/g_items.c +++ b/reaction/game/g_items.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.57 2003/09/08 19:19:19 makro +// New code for respawning entities in TP +// // Revision 1.56 2003/04/26 22:33:06 jbravo // Wratted all calls to G_FreeEnt() to avoid crashing and provide debugging // @@ -778,6 +781,8 @@ gentity_t *LaunchItem(gitem_t * item, vec3_t origin, vec3_t velocity, int xr_fla dropped->r.contents = CONTENTS_TRIGGER; dropped->touch = Touch_Item; + //Makro - added for TP + dropped->reset = G_ResetItem; //Elder: suspend thrown knives so they don't jitter //G_Printf("xr_flags: %d, condition: %d\n", xr_flags, (xr_flags & FL_THROWN_KNIFE) == FL_THROWN_KNIFE); @@ -1006,17 +1011,6 @@ void FinishSpawningItem(gentity_t * ent) ent->think = RespawnItem; return; } - //Makro - for bots and TP - if (ent != NULL) { - if (ent->item != NULL) { - if (ent->item->giType == IT_WEAPON || ent->item->giType == IT_AMMO) { - if (g_gametype.integer == GT_TEAMPLAY) { - ent->r.svFlags |= MASK_BOTHACK; - ent->s.eFlags |= EF_NODRAW; - } - } - } - } trap_RQ3LinkEntity(ent, __LINE__, __FILE__); } @@ -1177,6 +1171,71 @@ int G_ItemDisabled(gitem_t * item) return trap_Cvar_VariableIntegerValue(name); } +/* +============ +G_ResetItem + +Removes unneeded items at the begining +of TeamPlay rounds +Added by Makro +============ +*/ +void G_ResetItem(gentity_t *ent) +{ + //Makro - if the item is used for bot navigation, do nothing + //if ((ent->r.svFlags & MASK_BOTHACK) == MASK_BOTHACK) + // return; + //if not, simply remove it from the map + if (ent->item->giType == IT_WEAPON) { + switch (ent->item->giTag) { + case WP_MP5: + case WP_M4: + case WP_M3: + case WP_HANDCANNON: + case WP_SSG3000: + case WP_PISTOL: + case WP_KNIFE: + case WP_GRENADE: + G_FreeEntity(ent, __LINE__, __FILE__); + break; + default: + break; + } + } else if (ent->item->giType == IT_HOLDABLE) { + switch (ent->item->giTag) { + case HI_KEVLAR: + case HI_LASER: + case HI_SILENCER: + case HI_BANDOLIER: + case HI_SLIPPERS: + case HI_HELMET: + G_FreeEntity(ent, __LINE__, __FILE__); + break; + default: + break; + } + } else if (ent->item->giType == IT_AMMO) { + G_FreeEntity(ent, __LINE__, __FILE__); + } +} + +//Makro - bot hack ! will keep the items in a map in TP mode, but make them +//invisible and unusable +void G_BotOnlyItem(gentity_t *ent) +{ + if (g_gametype.integer == GT_TEAMPLAY) { + if (ent != NULL) { + if (ent->item != NULL) { + if (ent->item->giType == IT_WEAPON || ent->item->giType == IT_AMMO) { + ent->r.svFlags |= MASK_BOTHACK; + ent->s.eFlags |= EF_NODRAW; + ent->noreset = 1; + } + } + } + } +} + /* ============ G_SpawnItem @@ -1204,6 +1263,8 @@ void G_SpawnItem(gentity_t * ent, gitem_t * item) // spawns until the third frame so they can ride trains ent->nextthink = level.time + FRAMETIME * 2; ent->think = FinishSpawningItem; + //Makro - respawn function + ent->reset = G_ResetItem; ent->physicsBounce = 0.50; // items are bouncy diff --git a/reaction/game/g_local.h b/reaction/game/g_local.h index a1d4c1f4..197cf087 100644 --- a/reaction/game/g_local.h +++ b/reaction/game/g_local.h @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.146 2003/09/08 19:19:19 makro +// New code for respawning entities in TP +// // Revision 1.145 2003/09/07 20:02:51 makro // no message // @@ -511,6 +514,9 @@ struct gentity_s { void (*use) (gentity_t * self, gentity_t * other, gentity_t * activator); void (*pain) (gentity_t * self, gentity_t * attacker, int damage); void (*die) (gentity_t * self, gentity_t * inflictor, gentity_t * attacker, int damage, int mod); + //Makro - called at the begining of the round in TP + void (*reset) (gentity_t *self); + qboolean noreset; //Makro - if set to 1, this entity will not respawn in TP int pain_debounce_time; int fly_sound_debounce_time; // wind tunnel @@ -977,6 +983,8 @@ qboolean G_SpawnInt(const char *key, const char *defaultString, int *out); qboolean G_SpawnVector(const char *key, const char *defaultString, float *out); void G_SpawnEntitiesFromString(void); char *G_NewString(const char *string); +//Makro - bot hack +void G_BotOnlyItem(gentity_t *ent); // // g_cmds.c @@ -1024,6 +1032,8 @@ int ArmorIndex(gentity_t * ent); //Elder: added bandolier factor void Add_Ammo(gentity_t * ent, int weapon, int count, int bandolierfactor); void Touch_Item(gentity_t * ent, gentity_t * other, trace_t * trace); +//Makro - added +void G_ResetItem(gentity_t *ent); void ClearRegisteredItems(void); void RegisterItem(gitem_t * item); diff --git a/reaction/game/g_misc.c b/reaction/game/g_misc.c index 6b4384a6..3af95cd9 100644 --- a/reaction/game/g_misc.c +++ b/reaction/game/g_misc.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.76 2003/09/08 19:19:19 makro +// New code for respawning entities in TP +// // Revision 1.75 2003/09/07 20:02:51 makro // no message // @@ -266,7 +269,14 @@ void use_dlight(gentity_t * ent, gentity_t * other, gentity_t * activator) return; } } - ent->unbreakable = !ent->unbreakable; + ent->unbreakable ^= 1; + if (other) + if (other->pathtarget) + if (!Q_stricmp(other->pathtarget, "off")) + ent->unbreakable = 0; + else if (!Q_stricmp(other->pathtarget, "on")) + ent->unbreakable = 1; + if (ent->unbreakable) { ent->r.svFlags |= SVF_NOCLIENT; ent->s.eFlags |= EF_NODRAW; @@ -277,6 +287,15 @@ void use_dlight(gentity_t * ent, gentity_t * other, gentity_t * activator) //G_Printf("\nUsing dlight: %d\n\n", ent->unbreakable); } +void reset_dlight(gentity_t *ent) +{ + ent->unbreakable = 0; + if (ent->spawnflags & 8) { + ent->unbreakable = 1; + ent->use(ent, NULL, NULL); + } +} + void SP_dlight(gentity_t * ent) { vec3_t color; @@ -370,11 +389,12 @@ void SP_dlight(gentity_t * ent) ent->think = Think_SetupTrainTargets; } } - //Makro - added START_OFF flag ent->use = use_dlight; - ent->unbreakable = qfalse; + ent->reset = reset_dlight; + //Makro - added START_OFF flag + ent->unbreakable = 0; if (ent->spawnflags & 8) { - ent->unbreakable = qtrue; + ent->unbreakable = 1; ent->use(ent, NULL, NULL); } @@ -823,6 +843,16 @@ Type is the value set in the type key. Texture is any texture(s) referenced by t If you wish to add a custom breakable to your map, please include your mapname (or perhaps 3 letters of it) in the type name to prevent conflicts (i.e. don't use 'brick', use 'tequila_brick' or just 'teq_brick'). See the breakables folder included in Reaction Quake 3 for the proper format. */ +void reset_breakable(gentity_t *ent) +{ + trap_RQ3LinkEntity(ent, __LINE__, __FILE__); + + ent->exploded = qfalse; + ent->takedamage = qtrue; + ent->s.eType = ET_BREAKABLE; + ent->health = ent->health_saved; +} + static void InitBreakable_Finish(gentity_t * ent) { char info[MAX_INFO_STRING]; @@ -969,6 +999,9 @@ void SP_func_breakable(gentity_t * ent) // Let it know it is a breakable object ent->s.eType = ET_BREAKABLE; + //Makro - reset function + ent->reset = reset_breakable; + // If the mapper gave it a model, use it if (ent->model2) { ent->s.modelindex2 = G_ModelIndex(ent->model2); diff --git a/reaction/game/g_mover.c b/reaction/game/g_mover.c index 29a66b95..8437b28e 100644 --- a/reaction/game/g_mover.c +++ b/reaction/game/g_mover.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.64 2003/09/08 19:19:19 makro +// New code for respawning entities in TP +// // Revision 1.63 2003/09/07 20:02:51 makro // no message // @@ -1403,7 +1406,7 @@ void Think_SpawnNewDoorTrigger(gentity_t * ent) trap_RQ3LinkEntity(other, __LINE__, __FILE__); } //Makro - some doors shouldn't have triggers for spectators - if (!ent->unbreakable) { + if (!ent->explosive) { // NiceAss: This trigger will be for spectators // NiceAss: Undo the stretched box size // expand @@ -1439,6 +1442,27 @@ void Think_MatchTeam(gentity_t * ent) MatchTeam(ent, ent->moverState, level.time); } +//Makro - respawns doors in TP +void reset_door(gentity_t *ent) +{ + //Makro - if on a team and the team master doesn't respawn + if (ent->teammaster) + if (ent->teammaster->noreset) + return; + ent->health = ent->health_saved; + if (ent->health) + ent->takedamage = qtrue; + ent->inactive = ent->unbreakable; + if (!Q_stricmp(ent->classname, "func_door")) + SetMoverState(ent, MOVER_POS1, level.time); + else + SetMoverState(ent, ROTATOR_POS1, level.time); + //Elder: open areaportals for start_open doors + if ((ent->spawnflags & 1) == 1 && (ent->teammaster == ent || !ent->teammaster)) { + trap_RQ3AdjustAreaPortalState(ent, qtrue, __LINE__, __FILE__); + } +} + //Elder: old func_door Radiant comment /*QUAKED func_door (0 .5 .8) ? START_OPEN x CRUSHER TOGGLE wait in both the start and end states for a trigger event. @@ -1577,6 +1601,9 @@ void SP_func_door(gentity_t * ent) InitMover(ent); + if (ent->health) + ent->takedamage = qtrue; + if (!(ent->flags & FL_TEAMSLAVE)) { //int health; int noSpecs = 0; @@ -1584,13 +1611,10 @@ void SP_func_door(gentity_t * ent) //G_SpawnInt("health", "0", &ent->health); //Makro - added //ent->health_saved = ent->health; - if (ent->health) { - ent->takedamage = qtrue; - } //Makro - some doors don't need spectator triggers G_SpawnInt("nospectators", "0", &noSpecs); - //hijacking unbreakable field - ent->unbreakable = noSpecs; + //hijacking explosive field + ent->explosive = noSpecs; ent->think = Think_SpawnNewDoorTrigger; ent->nextthink = level.time + FRAMETIME; } @@ -1599,6 +1623,10 @@ void SP_func_door(gentity_t * ent) trap_RQ3AdjustAreaPortalState(ent, qtrue, __LINE__, __FILE__); } + //Makro - added + ent->unbreakable = ent->inactive; + ent->reset = reset_door; + } // REACTION @@ -1746,8 +1774,8 @@ void SP_func_door_rotating(gentity_t * ent) } //Makro - some doors don't need spectator triggers G_SpawnInt("nospectators", "0", &noSpecs); - //hijacking unbreakable field - ent->unbreakable = noSpecs; + //hijacking explosive field + ent->explosive = noSpecs; ent->think = Think_SpawnNewDoorTrigger; ent->nextthink = level.time + FRAMETIME; } @@ -1757,6 +1785,9 @@ void SP_func_door_rotating(gentity_t * ent) trap_RQ3AdjustAreaPortalState(ent, qtrue, __LINE__, __FILE__); } + //Makro - added + ent->unbreakable = ent->inactive; + ent->reset = reset_door; } /* @@ -2333,6 +2364,15 @@ void Use_Func_Train(gentity_t * ent, gentity_t * other, gentity_t * activator) */ } +void Reset_Func_Train(gentity_t *ent) +{ + ent->nextTrain = G_Find2(NULL, FOFS(targetname), ent->target, FOFS(classname), "path_corner"); + if (!ent->nextTrain) + return; + VectorClear(ent->r.currentAngles); + Think_BeginMoving(ent); +} + /*QUAKED func_train (0 .5 .8) ? START_ON TOGGLE BLOCK_STOPS A train is a mover that moves between path_corner target points. Trains MUST HAVE AN ORIGIN BRUSH. @@ -2382,6 +2422,7 @@ void SP_func_train(gentity_t * self) //Makro - added self->use = Use_Func_Train; self->blocked = Blocked_Door; + self->reset = Reset_Func_Train; } /* @@ -2399,17 +2440,10 @@ A bmodel that just sits there, doing nothing. Can be used for conditional walls "light" constantLight radius */ //Makro - added for triggerable func_statics -void use_func_static(gentity_t * ent, gentity_t * other, gentity_t * activator) + +void SetFuncStaticState(gentity_t *ent, qboolean state) { - //Makro - added "pathtarget" checks - if (!Q_stricmp(ent->pathtarget, "on")) - ent->count = 1; - else - if (!Q_stricmp(ent->pathtarget, "off")) - ent->count = 0; - else - ent->count ^= 1; - if (ent->count) { + if (state) { ent->s.eFlags &= ~EF_NODRAW; ent->r.contents = CONTENTS_SOLID; ent->r.svFlags &= ~SVF_NOCLIENT; @@ -2420,6 +2454,28 @@ void use_func_static(gentity_t * ent, gentity_t * other, gentity_t * activator) } } +void use_func_static(gentity_t * ent, gentity_t * other, gentity_t * activator) +{ + //Makro - added "pathtarget" checks + if (other && other->pathtarget) { + if (!Q_stricmp(other->pathtarget, "on")) + ent->count = 1; + else if (!Q_stricmp(other->pathtarget, "off")) + ent->count = 0; + else + ent->count ^= 1; + } else { + ent->count ^= 1; + } + SetFuncStaticState(ent, ent->count); +} + +void reset_func_static(gentity_t *self) +{ + self->count = (self->spawnflags & 1); + self->use(self, NULL, NULL); +} + void SP_func_static(gentity_t * ent) { trap_SetBrushModel(ent, ent->model); @@ -2427,10 +2483,9 @@ void SP_func_static(gentity_t * ent) VectorCopy(ent->s.origin, ent->s.pos.trBase); VectorCopy(ent->s.origin, ent->r.currentOrigin); //Makro - added - ent->count = (ent->spawnflags & 1); ent->use = use_func_static; - ent->use(ent, NULL, NULL); - //end Makro + ent->reset = reset_func_static; + ent->reset(ent); } /* diff --git a/reaction/game/g_spawn.c b/reaction/game/g_spawn.c index 83cb200f..0dcd6c43 100644 --- a/reaction/game/g_spawn.c +++ b/reaction/game/g_spawn.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.47 2003/09/08 19:19:20 makro +// New code for respawning entities in TP +// // Revision 1.46 2003/09/07 20:02:51 makro // no message // @@ -238,8 +241,9 @@ field_t fields[] = { {"distance", FOFS(distance), F_FLOAT}, // VALKYRIE: for rotating doors {"targetinactive", FOFS(targetInactive), F_LSTRING}, // Makro - target to be fired when inactive {"pathtarget", FOFS(pathtarget), F_LSTRING}, // Makro - for func_trains - {"inactive", FOFS(inactive), F_INT}, // Makro - added + {"inactive", FOFS(inactive), F_INT}, // Makro - for inactive objects {"activatename", FOFS(activatename), F_LSTRING}, + {"noreset", FOFS(noreset), F_INT}, //Makro - for entities that shouldn't respawn in TP {NULL} }; @@ -529,16 +533,19 @@ qboolean G_CallSpawn(gentity_t * ent) for (item = bg_itemlist + 1; item->classname; item++) { if (!strcmp(item->classname, ent->classname)) { - //only spawn flags in CTF mode + //if it's a flag if (item->giType == IT_TEAM && (item->giTag == PW_REDFLAG || item->giTag == PW_BLUEFLAG)) { - // JBravo: no spawning in CTF + //only spawn it in CTF if (g_gametype.integer == GT_CTF) { G_SpawnItem(ent, item); - return qtrue; } + return qtrue; } else { - if (g_gametype.integer != GT_CTF) + // JBravo: no spawning in CTF + if (g_gametype.integer != GT_CTF) { G_SpawnItem(ent, item); + G_BotOnlyItem(ent); + } return qtrue; } } @@ -856,14 +863,14 @@ void SP_worldspawn(void) trap_SetConfigstring( CS_LOADINGSCREEN, info ); */ - //Makro - fog hull - G_SpawnVector("_rq3_fog_color", "0 0 0", color); - memset(info, 0, sizeof(info)); - Info_SetValueForKey(info, "r", va("%f", color[0])); - Info_SetValueForKey(info, "g", va("%f", color[1])); - Info_SetValueForKey(info, "b", va("%f", color[2])); - //G_Printf("^4 FOG HULL: %s\n", vtos(color)); - trap_SetConfigstring( CS_FOGHULL, info ); + //Makro - fog hull replacement + if (G_SpawnVector("_rq3_fog_color", "0 0 0", color)) { + memset(info, 0, sizeof(info)); + Info_SetValueForKey(info, "r", va("%f", color[0])); + Info_SetValueForKey(info, "g", va("%f", color[1])); + Info_SetValueForKey(info, "b", va("%f", color[2])); + trap_SetConfigstring( CS_FOGHULL, info ); + } trap_SetConfigstring(CS_MOTD, g_motd.string); // message of the day diff --git a/reaction/game/g_target.c b/reaction/game/g_target.c index 4c2d9b66..b974a859 100644 --- a/reaction/game/g_target.c +++ b/reaction/game/g_target.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.14 2003/09/08 19:19:20 makro +// New code for respawning entities in TP +// // Revision 1.13 2003/08/26 19:28:38 makro // target_speakers // @@ -213,9 +216,29 @@ Multiple identical looping sounds will just increase volume without any speed co "wait" : Seconds between auto triggerings, 0 = don't auto trigger "random" wait variance, default is 0 */ +void reset_target_speaker(gentity_t *ent) +{ + //looped on + if (ent->spawnflags & 1) + ent->s.loopSound = ent->noise_index; + //looped off + else if (ent->spawnflags & 2) + ent->s.loopSound = 0; +} + void Use_Target_Speaker(gentity_t * ent, gentity_t * other, gentity_t * activator) { if (ent->spawnflags & 3) { // looping sound toggles + //Makro - check the pathtarget of the triggering entity + if (other->pathtarget) { + if (!Q_stricmp(other->pathtarget, "on")) { + ent->s.loopSound = ent->noise_index; + return; + } else if (!Q_stricmp(other->pathtarget, "off")) { + ent->s.loopSound = 0; + return; + } + } if (ent->s.loopSound) ent->s.loopSound = 0; // turn it off else @@ -270,7 +293,8 @@ void SP_target_speaker(gentity_t * ent) if (ent->spawnflags & 1) { ent->s.loopSound = ent->noise_index; } - + + ent->reset = reset_target_speaker; ent->use = Use_Target_Speaker; if (ent->spawnflags & 4) { diff --git a/reaction/game/g_teamplay.c b/reaction/game/g_teamplay.c index 1ad4b461..992098ad 100644 --- a/reaction/game/g_teamplay.c +++ b/reaction/game/g_teamplay.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.153 2003/09/08 19:19:20 makro +// New code for respawning entities in TP +// // Revision 1.152 2003/04/26 22:33:06 jbravo // Wratted all calls to G_FreeEnt() to avoid crashing and provide debugging // @@ -774,57 +777,10 @@ void CleanLevel() ClearBodyQue(); ent = &g_entities[MAX_CLIENTS]; + //Makro - call the reset function for all the entities in the map for (i = MAX_CLIENTS; i < level.num_entities; i++, ent++) { - if (!ent->inuse) - continue; - if (!ent->item) { - if (!ent->classname) - continue; - //Makro - reset func_statics each round - if (!Q_stricmp(ent->classname, "func_static")) { - ent->count = (ent->spawnflags & 1); - ent->use(ent, NULL, NULL); - //Makro - reset door health each round - } else if (ent->s.eType == ET_MOVER && ent->takedamage) { - ent->health = ent->health_saved; - } - continue; - } - //Makro - added this for bots - if ((ent->r.svFlags & SVF_NOCLIENT) && (ent->r.svFlags & SVF_BOTHACK)) - continue; - if (ent->item->giType == IT_WEAPON) { - switch (ent->item->giTag) { - case WP_MP5: - case WP_M4: - case WP_M3: - case WP_HANDCANNON: - case WP_SSG3000: - case WP_PISTOL: - case WP_KNIFE: - case WP_GRENADE: - G_FreeEntity(ent, __LINE__, __FILE__); - break; - default: - break; - } - } else if (ent->item->giType == IT_HOLDABLE) { - switch (ent->item->giTag) { - case HI_KEVLAR: - case HI_LASER: - case HI_SILENCER: - case HI_BANDOLIER: - case HI_SLIPPERS: - case HI_HELMET: - G_FreeEntity(ent, __LINE__, __FILE__); - break; - default: - break; - } - } else if (ent->item->giType == IT_AMMO) { - //Makro - added - G_FreeEntity(ent, __LINE__, __FILE__); - } + if (ent->reset && !ent->noreset) + ent->reset(ent); } } @@ -1013,7 +969,7 @@ void CheckForUnevenTeams(gentity_t * player) void SpawnPlayers() { - gentity_t *player, *ent; + gentity_t *player; gclient_t *client; int clientNum, i; @@ -1065,6 +1021,8 @@ void SpawnPlayers() } } //Blaze: May aswell respawn breakables here + //Makro - using a generic respawn function for all the entities now + /* for (i = 0; i < level.num_entities; i++) { ent = &g_entities[i]; if (ent != NULL && ent->classname != NULL && !strcmp(ent->classname, "func_breakable")) { @@ -1077,6 +1035,7 @@ void SpawnPlayers() ent->health = ent->health_saved; } } + */ } /* Let the player Choose the weapon and/or item he wants */ diff --git a/reaction/game/g_trigger.c b/reaction/game/g_trigger.c index 7ba7cae0..759f076d 100644 --- a/reaction/game/g_trigger.c +++ b/reaction/game/g_trigger.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.28 2003/09/08 19:19:20 makro +// New code for respawning entities in TP +// // Revision 1.27 2003/07/30 16:05:46 makro // no message // @@ -130,9 +133,15 @@ void multi_trigger(gentity_t * ent, gentity_t * activator) } else { // we can't just remove (self) here, because this is a touch function // called while looping through area links... + //Makro - we no longer remove the entity, we just make it inactive + //otherwise, we would only be able to use it during the first + //round in TP games + /* ent->touch = 0; ent->nextthink = level.time + FRAMETIME; ent->think = G_RealFreeEntity; + */ + ent->inactive = 1; } } @@ -149,6 +158,13 @@ void Touch_Multi(gentity_t * self, gentity_t * other, trace_t * trace) multi_trigger(self, other); } +void Reset_Multi(gentity_t *ent) +{ + ent->inactive = ent->unbreakable; + ent->think = 0; + ent->nextthink = 0; +} + /*QUAKED trigger_multiple (.5 .5 .5) ? "wait" : Seconds between triggerings, 0.5 default, -1 = one time only. "random" wait variance, default is 0 @@ -168,6 +184,8 @@ void SP_trigger_multiple(gentity_t * ent) ent->touch = Touch_Multi; ent->use = Use_Multi; + ent->unbreakable = ent->inactive; + ent->reset = Reset_Multi; InitTrigger(ent); trap_RQ3LinkEntity(ent, __LINE__, __FILE__); diff --git a/reaction/game/game.plg b/reaction/game/game.plg index 5cd2fc24..3551c986 100644 --- a/reaction/game/game.plg +++ b/reaction/game/game.plg @@ -6,108 +6,6 @@ --------------------Configuration: game - Win32 Release--------------------

Command Lines

-Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP312.tmp" with contents -[ -/nologo /G6 /ML /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FR"c:\reactionoutput/" /Fp"c:\reactionoutput/game.pch" /YX /Fo"c:\reactionoutput/" /Fd"c:\reactionoutput/" /FD /c -"C:\Games\Quake3\rq3source\reaction\game\g_misc.c" -] -Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP312.tmp" -Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP313.tmp" with contents -[ -kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows /dll /incremental:no /pdb:"c:\reactionoutput/qagamex86.pdb" /map:"c:\reactionoutput/qagamex86.map" /machine:I386 /def:".\game.def" /out:"..\Release/qagamex86.dll" /implib:"c:\reactionoutput/qagamex86.lib" -\reactionoutput\ai_chat.obj -\reactionoutput\ai_cmd.obj -\reactionoutput\ai_dmnet.obj -\reactionoutput\ai_dmq3.obj -\reactionoutput\ai_main.obj -\reactionoutput\ai_team.obj -\reactionoutput\ai_vcmd.obj -\reactionoutput\bg_misc.obj -\reactionoutput\bg_pmove.obj -\reactionoutput\bg_slidemove.obj -\reactionoutput\g_active.obj -\reactionoutput\g_arenas.obj -\reactionoutput\g_bot.obj -\reactionoutput\g_client.obj -\reactionoutput\g_cmds.obj -\reactionoutput\g_combat.obj -\reactionoutput\g_fileio.obj -\reactionoutput\g_items.obj -\reactionoutput\g_main.obj -\reactionoutput\g_matchmode.obj -\reactionoutput\g_mem.obj -\reactionoutput\g_misc.obj -\reactionoutput\g_missile.obj -\reactionoutput\g_mover.obj -\reactionoutput\g_session.obj -\reactionoutput\g_spawn.obj -\reactionoutput\g_svcmds.obj -\reactionoutput\g_syscalls.obj -\reactionoutput\g_target.obj -\reactionoutput\g_team.obj -\reactionoutput\g_teamplay.obj -\reactionoutput\g_trigger.obj -\reactionoutput\g_unlagged.obj -\reactionoutput\g_utils.obj -\reactionoutput\g_weapon.obj -\reactionoutput\q_math.obj -\reactionoutput\q_shared.obj -\reactionoutput\rxn_game.obj -\reactionoutput\zcam.obj -\reactionoutput\zcam_target.obj -] -Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP313.tmp" -

Output Window

-Compiling... -g_misc.c -Linking... - Creating library c:\reactionoutput/qagamex86.lib and object c:\reactionoutput/qagamex86.exp -Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP317.tmp" with contents -[ -/nologo /o"c:\reactionoutput/game.bsc" -\reactionoutput\ai_chat.sbr -\reactionoutput\ai_cmd.sbr -\reactionoutput\ai_dmnet.sbr -\reactionoutput\ai_dmq3.sbr -\reactionoutput\ai_main.sbr -\reactionoutput\ai_team.sbr -\reactionoutput\ai_vcmd.sbr -\reactionoutput\bg_misc.sbr -\reactionoutput\bg_pmove.sbr -\reactionoutput\bg_slidemove.sbr -\reactionoutput\g_active.sbr -\reactionoutput\g_arenas.sbr -\reactionoutput\g_bot.sbr -\reactionoutput\g_client.sbr -\reactionoutput\g_cmds.sbr -\reactionoutput\g_combat.sbr -\reactionoutput\g_fileio.sbr -\reactionoutput\g_items.sbr -\reactionoutput\g_main.sbr -\reactionoutput\g_matchmode.sbr -\reactionoutput\g_mem.sbr -\reactionoutput\g_misc.sbr -\reactionoutput\g_missile.sbr -\reactionoutput\g_mover.sbr -\reactionoutput\g_session.sbr -\reactionoutput\g_spawn.sbr -\reactionoutput\g_svcmds.sbr -\reactionoutput\g_syscalls.sbr -\reactionoutput\g_target.sbr -\reactionoutput\g_team.sbr -\reactionoutput\g_teamplay.sbr -\reactionoutput\g_trigger.sbr -\reactionoutput\g_unlagged.sbr -\reactionoutput\g_utils.sbr -\reactionoutput\g_weapon.sbr -\reactionoutput\q_math.sbr -\reactionoutput\q_shared.sbr -\reactionoutput\rxn_game.sbr -\reactionoutput\zcam.sbr -\reactionoutput\zcam_target.sbr] -Creating command line "bscmake.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP317.tmp" -Creating browse info file... -

Output Window