Fix incorrect teams and controllers for TOW objectives

This commit is contained in:
smallmodel 2024-10-06 15:20:45 +02:00
parent 09eb130b6d
commit afd7943b62
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512
5 changed files with 14 additions and 14 deletions

View file

@ -26,8 +26,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "animate.h"
typedef enum {
CONTROLLER_ALLIES,
CONTROLLER_AXIS,
CONTROLLER_ALLIES,
CONTROLLER_DRAW
} eController;

View file

@ -269,13 +269,13 @@ void TOWObjective::TakeOver(Event *ev)
switch (controller) {
case CONTROLLER_ALLIES:
gi.cvar_set(m_sAxisObjName.c_str(), "1");
gi.cvar_set(m_sAlliesObjName.c_str(), "0");
break;
case CONTROLLER_AXIS:
gi.cvar_set(m_sAxisObjName.c_str(), "0");
gi.cvar_set(m_sAlliesObjName.c_str(), "1");
break;
case CONTROLLER_AXIS:
gi.cvar_set(m_sAxisObjName.c_str(), "1");
gi.cvar_set(m_sAlliesObjName.c_str(), "0");
break;
default:
break;
}
@ -308,13 +308,13 @@ void TOWObjective::OnInitialize(Event *ev)
switch (m_eController) {
case CONTROLLER_ALLIES:
gi.cvar_set(m_sAxisObjName.c_str(), "1");
gi.cvar_set(m_sAlliesObjName.c_str(), "0");
break;
case CONTROLLER_AXIS:
gi.cvar_set(m_sAxisObjName.c_str(), "0");
gi.cvar_set(m_sAlliesObjName.c_str(), "1");
break;
case CONTROLLER_AXIS:
gi.cvar_set(m_sAxisObjName.c_str(), "1");
gi.cvar_set(m_sAlliesObjName.c_str(), "0");
break;
case CONTROLLER_DRAW:
gi.cvar_set(m_sAxisObjName.c_str(), "0");
gi.cvar_set(m_sAlliesObjName.c_str(), "0");

View file

@ -59,8 +59,8 @@ class TOWObjectiveMan
{
private:
Container<TOWObjective *> m_towObjectives;
int m_iNumAxisObjectives;
int m_iNumAlliesObjectives;
int m_iNumAxisObjectives;
public:
TOWObjectiveMan();

View file

@ -1720,10 +1720,10 @@ void DM_Manager::SetBombsPlanted(int num)
void DM_Manager::StopTeamRespawn(eController controller)
{
if (controller == CONTROLLER_AXIS) {
m_bAllowAxisRespawn = false;
} else if (controller == CONTROLLER_ALLIES) {
if (controller == CONTROLLER_ALLIES) {
m_bAllowAlliedRespawn = false;
} else if (controller == CONTROLLER_AXIS) {
m_bAllowAxisRespawn = false;
}
}

View file

@ -179,8 +179,8 @@ private:
int m_iNumBombsPlanted;
int m_iTotalMapTime;
bool m_bAllowAxisRespawn;
bool m_bAllowAlliedRespawn;
bool m_bAllowAxisRespawn;
bool m_bRoundActive;
// scoreboard data