Skip to content
Permalink
Browse files

targetname is now case sensitive. Elimination doors stay open until i…

…nstructed otherwise
  • Loading branch information
sago007 committed Aug 14, 2016
1 parent 1a0b9bb commit 5e309c9b9dd3e16a1a7c86187e13a23a22bfee52
Showing with 9 additions and 3 deletions.
  1. +2 −0 code/game/g_local.h
  2. +3 −3 code/game/g_main.c
  3. +4 −0 code/game/g_mover.c
@@ -69,6 +69,8 @@ typedef enum {

#define SP_PODIUM_MODEL "models/mapobjects/podium/podium4.md3"

#define ELIMINATION_ACTIVE_TARGETNAME "elimination_active"

extern int enableq;

//============================================================================
@@ -2126,7 +2126,7 @@ static void CloseEliminationDoors( void ) {
gentity_t* next;
next = NULL;
for (next = G_Find(next, FOFS(classname), "func_door"); next ; next = G_Find(next, FOFS(classname), "func_door") ) {
if ( Q_strequal(next->targetname, "elimination_active") ) {
if ( strequals(next->targetname, ELIMINATION_ACTIVE_TARGETNAME) ) {
if (next->moverState != MOVER_2TO1 && next->moverState != MOVER_POS1 ) {
MatchTeam(next, MOVER_2TO1, level.time);
}
@@ -2138,7 +2138,7 @@ static void CloseEliminationDoorsInstantly( void ) {
gentity_t* next;
next = NULL;
for (next = G_Find(next, FOFS(classname), "func_door"); next ; next = G_Find(next, FOFS(classname), "func_door") ) {
if ( Q_strequal(next->targetname, "elimination_active") ) {
if ( strequals(next->targetname, ELIMINATION_ACTIVE_TARGETNAME) ) {
if ( next->moverState != MOVER_POS1 ) {
MatchTeam(next, MOVER_POS1, level.time);
}
@@ -2150,7 +2150,7 @@ static void OpenEliminationDoors( void ) {
gentity_t* next;
next = NULL;
for (next = G_Find(next, FOFS(classname), "func_door"); next ; next = G_Find(next, FOFS(classname), "func_door") ) {
if ( Q_strequal(next->targetname, "elimination_active") ) {
if ( strequals(next->targetname, ELIMINATION_ACTIVE_TARGETNAME) ) {
if (next->moverState != MOVER_1TO2 && next->moverState != MOVER_POS2 ) {
MatchTeam(next, MOVER_1TO2, level.time);
}
@@ -962,6 +962,10 @@ void SP_func_door (gentity_t *ent) {
// leilei - HACK HACK HACK - indefinitely open door (from triggers, etc)
if (ent->wait == -1)
ent->wait = 99999999;

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

// default wait of 2 seconds
if (!ent->wait)

0 comments on commit 5e309c9

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