Skip to content
Permalink
Browse files

Added state_targetname instead of targetname. Of course state_targetn…

…ame does still overrule targetname in Elimination games but only in Elimination games.
  • Loading branch information...
sago007 committed Aug 20, 2016
1 parent 60ca9a3 commit bc80936a40c355db230db68a0092761e0d223ac0
Showing with 13 additions and 7 deletions.
  1. +0 −5 code/game/g_active.c
  2. +13 −2 code/game/g_mover.c
@@ -347,11 +347,6 @@ void SpectatorThink( gentity_t *ent, usercmd_t *ucmd ) {
G_TouchTriggers( ent );
trap_UnlinkEntity( ent );
}

/* Stopped players from going into follow mode in B5, should be fixed in B9
if(ent->client->sess.sessionTeam != TEAM_SPECTATOR && g_gametype.integer>=GT_ELIMINATION && g_gametype.integer<=GT_LMS)
return;
*/

client->oldbuttons = client->buttons;
client->buttons = ucmd->buttons;
@@ -963,8 +963,19 @@ void SP_func_door (gentity_t *ent) {
if (ent->wait == -1)
ent->wait = 99999999;

if ( strequals(ent->targetname, ELIMINATION_ACTIVE_TARGETNAME ) ) {
ent->wait = 99999999;

if ( g_gametype.integer == GT_ELIMINATION || g_gametype.integer == GT_CTF_ELIMINATION) {
char* value;
if ( strequals(ent->targetname, ELIMINATION_ACTIVE_TARGETNAME ) ) {
ent->wait = 99999999;
}

if (G_SpawnString("state_targetname","",&value)) {
if ( strequals(value, ELIMINATION_ACTIVE_TARGETNAME ) ) {
ent->wait = 99999999;
ent->targetname = value; //A state targetname replaces any other target
}
}
}

// default wait of 2 seconds

0 comments on commit bc80936

Please sign in to comment.
You can’t perform that action at this time.