void Violence_GibSplash_At(vector org, vector dir, float type, float amount, entity gibowner, entity attacker)
{
- if(g_cts) // no gibs in CTS
+ if(g_cts || g_ctscup) // no gibs in CTS
return;
entity e = new_pure(gibsplash);
MUTATOR_HOOKFUNCTION(cl_ctscup, HUD_Physics_showoptional)
{
- return ISGAMETYPE(CTSCup); // show the optional physics panel
+ return ISGAMETYPE(CTSCUP); // show the optional physics panel
}
MUTATOR_HOOKFUNCTION(cl_ctscup, HUD_StrafeHUD_showoptional)
{
- return ISGAMETYPE(CTSCup); // show the optional strafehud
+ return ISGAMETYPE(CTSCUP); // show the optional strafehud
}
MUTATOR_HOOKFUNCTION(cl_ctscup, HUD_Score_show)
{
- return spectatee_status == -1 && ISGAMETYPE(CTSCup); // hide the score panel while observing
+ return spectatee_status == -1 && ISGAMETYPE(CTSCUP); // hide the score panel while observing
}
MUTATOR_HOOKFUNCTION(cl_ctscup, DrawScoreboardItemStats)
{
- return ISGAMETYPE(CTSCup); // hide the item stats panel
+ return ISGAMETYPE(CTSCUP); // hide the item stats panel
}
MUTATOR_HOOKFUNCTION(cl_ctscup, DrawDeathScoreboard)
{
- return ISGAMETYPE(CTSCup); // no scoreboard shown while dead
+ return ISGAMETYPE(CTSCUP); // no scoreboard shown while dead
}
MUTATOR_HOOKFUNCTION(cl_ctscup, DrawScoreboardAccuracy)
{
- return ISGAMETYPE(CTSCup); // accuracy is not a factor in this gamemode
+ return ISGAMETYPE(CTSCUP); // accuracy is not a factor in this gamemode
}
MUTATOR_HOOKFUNCTION(cl_ctscup, ShowRankings)
{
- if(ISGAMETYPE(CTSCup))
+ if(ISGAMETYPE(CTSCUP))
{
M_ARGV(0, string) = _("Rankings");
return true;
MUTATOR_HOOKFUNCTION(cl_ctscup, ShowNames_Draw)
{
- return (ISGAMETYPE(CTSCup) && M_ARGV(1, float) < ALPHA_MIN_VISIBLE);
+ return (ISGAMETYPE(CTSCUP) && M_ARGV(1, float) < ALPHA_MIN_VISIBLE);
}
MUTATOR_HOOKFUNCTION(cl_ctscup, ShowRaceTimer)
{
- return ISGAMETYPE(CTSCup); // show the race timer panel
+ return ISGAMETYPE(CTSCUP); // show the race timer panel
}
#endif
ATTRIB(RaceCTSCup, m_legacydefaults, string, "20 0 0");
ENDCLASS(RaceCTSCup)
-REGISTER_GAMETYPE(CTSCup, NEW(RaceCTSCup));
-#define g_ctscup IS_GAMETYPE(CTSCup)
+REGISTER_GAMETYPE(CTSCUP, NEW(RaceCTSCup));
+#define g_ctscup IS_GAMETYPE(CTSCUP)
{
MapInfo_Map_supportedGametypes &= ~MAPINFO_TYPE_RACE.m_flags;
MapInfo_Map_supportedGametypes |= MAPINFO_TYPE_CTS.m_flags;
+ MapInfo_Map_supportedGametypes |= MAPINFO_TYPE_CTSCUP.m_flags;
}
LOG_TRACE("-> diameter ", ftos(diameter));
int req = 0;
// TODO: find a better way to check if weapons are required on the map
if(!(cvar("g_instagib") || cvar("g_overkill") || cvar("g_nix") || cvar("g_weaponarena") || !cvar("g_pickup_items") || !cvar("g_melee_only")
- || cvar("g_race") || cvar("g_cts") || cvar("g_nexball") || cvar("g_ca") || cvar("g_freezetag") || cvar("g_lms")))
+ || cvar("g_race") || cvar("g_cts") || cvar("g_ctscup") || cvar("g_nexball") || cvar("g_ca") || cvar("g_freezetag") || cvar("g_lms")))
req |= MAPINFO_FEATURE_WEAPONS;
return req;
}
if(IS_PLAYER(player))
{
if((tflags & TELEPORT_FLAG_TDEATH) && player.takedamage && !IS_DEAD(player)
- && !g_race && !g_cts && (autocvar_g_telefrags || (tflags & TELEPORT_FLAG_FORCE_TDEATH))
+ && !g_race && !g_cts && !g_ctscup && (autocvar_g_telefrags || (tflags & TELEPORT_FLAG_FORCE_TDEATH))
&& !(round_handler_IsActive() && !round_handler_IsRoundStarted()))
{
tdeath(player, teleporter, telefragger, telefragmin, telefragmax);
MUTATOR_HOOKFUNCTION(cloaked, BuildMutatorsPrettyString)
{
- if (!g_cts) M_ARGV(0, string) = strcat(M_ARGV(0, string), ", Cloaked");
+ if (!g_cts && !g_ctscup) M_ARGV(0, string) = strcat(M_ARGV(0, string), ", Cloaked");
}
bool wasactive = (actor.statuseffects && (actor.statuseffects.statuseffect_flags[this.m_id] & STATUSEFFECT_FLAG_ACTIVE));
if(!wasactive && IS_PLAYER(actor))
{
- if(!g_cts)
+ if((!g_cts && !g_ctscup))
Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_POWERUP_INVISIBILITY, actor.netname);
Send_Notification(NOTIF_ONE, actor, MSG_CENTER, CENTER_POWERUP_INVISIBILITY);
}
bool wasactive = (actor.statuseffects && (actor.statuseffects.statuseffect_flags[this.m_id] & STATUSEFFECT_FLAG_ACTIVE));
if(!wasactive && IS_PLAYER(actor))
{
- if(!g_cts)
+ if(!g_cts && !g_ctscup)
Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_POWERUP_SHIELD, actor.netname);
Send_Notification(NOTIF_ONE, actor, MSG_CENTER, CENTER_POWERUP_SHIELD);
}
bool wasactive = (actor.statuseffects && (actor.statuseffects.statuseffect_flags[this.m_id] & STATUSEFFECT_FLAG_ACTIVE));
if(!wasactive && IS_PLAYER(actor))
{
- if(!g_cts)
+ if(!g_cts && !g_ctscup)
Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_POWERUP_SPEED, actor.netname);
Send_Notification(NOTIF_ONE, actor, MSG_CENTER, CENTER_POWERUP_SPEED);
}
bool wasactive = (actor.statuseffects && (actor.statuseffects.statuseffect_flags[this.m_id] & STATUSEFFECT_FLAG_ACTIVE));
if(!wasactive && IS_PLAYER(actor))
{
- if(!g_cts)
+ if(!g_cts && !g_ctscup)
Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_POWERUP_STRENGTH, actor.netname);
Send_Notification(NOTIF_ONE, actor, MSG_CENTER, CENTER_POWERUP_STRENGTH);
}
subpattern3 = ",teamspawns,";
else
subpattern3 = ",noteamspawns,";
- if(gt == MAPINFO_TYPE_RACE || gt == MAPINFO_TYPE_CTS)
+ if(gt == MAPINFO_TYPE_RACE || gt == MAPINFO_TYPE_CTS || gt == MAPINFO_TYPE_CTSCUP)
subpattern4 = ",race,";
else
subpattern4 = string_null;
#define HIDDEN_GAMETYPES \
GAMETYPE(MAPINFO_TYPE_RACE) \
GAMETYPE(MAPINFO_TYPE_CTS) \
+ GAMETYPE(MAPINFO_TYPE_CTSCUP) \
/**/
Gametype GameType_GetID(int cnt)
modifications = strcat(modifications, ", No start weapons");
if(cvar("sv_gravity") < stof(cvar_defstring("sv_gravity")))
modifications = strcat(modifications, ", Low gravity");
- if(g_weapon_stay && !g_cts)
+ if(g_weapon_stay && !g_cts && !g_ctscup)
modifications = strcat(modifications, ", Weapons stay");
if(autocvar_g_jetpack)
modifications = strcat(modifications, ", Jetpack");
this.items = this.items | IT_SUPERWEAPON;
if(!(this.items & IT_UNLIMITED_SUPERWEAPONS))
{
- if(!g_cts)
+ if(!g_cts && !g_ctscup)
Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_SUPERWEAPON_PICKUP, this.netname);
Send_Notification(NOTIF_ONE, this, MSG_CENTER, CENTER_SUPERWEAPON_PICKUP);
}
STAT(PRESSED_KEYS, this) = 0;
}
ClientData_Touch(this);
- if (g_race || g_cts) race_InitSpectator();
+ if (g_race || g_cts || g_ctscup) race_InitSpectator();
}
}
int i, j, k, uidcnt = 0, thiscnt;
string s, temp_s, rr, myuid, thisuid;
- rr = (g_cts) ? CTS_RECORD : RACE_RECORD;
+ rr = ((g_cts || g_ctscup)) ? CTS_RECORD : RACE_RECORD;
for (k = 0; k < MapInfo_count; ++k)
{
continue; // we still get the added count, but skip the actual processing
// todo: Check by play count of maps for other game types?
- if((g_race || g_cts) && !race_readTime(MapInfo_Map_bspname, 1))
+ if((g_race || g_cts || g_ctscup) && !race_readTime(MapInfo_Map_bspname, 1))
{
newmaps = true;
if (i % 2) col = "^4*"; else col = "^5*";
}
spawnfunc(target_score)
{
- if(!g_cts) { delete(this); return; }
+ if(!g_cts && !g_ctscup) { delete(this); return; }
if(!this.count)
this.count = 1;
}
spawnfunc(target_fragsFilter)
{
- if(!g_cts) { delete(this); return; }
+ if(!g_cts && !g_ctscup) { delete(this); return; }
if(!this.frags)
this.frags = 1;
return;
}
- if(g_cts && deathtype == DEATH_KILL.m_id)
+ if((g_cts || g_ctscup) && deathtype == DEATH_KILL.m_id)
return; // TODO: somehow put this in CTS gamemode file!
Notification death_message = (murder) ? deathent.death_msgmurder : deathent.death_msgself;
delete(this.personal);
this.personal = NULL;
- if((g_cts || g_race) && autocvar_g_allow_checkpoints)
+ if((g_race || g_cts || g_ctscup) && autocvar_g_allow_checkpoints)
ClientKill(this);
}
sprint(this, "personal waypoint cleared\n");
{
delete(this.personal);
this.personal = NULL;
- if((g_cts || g_race) && autocvar_g_allow_checkpoints)
+ if((g_race || g_cts || g_ctscup) && autocvar_g_allow_checkpoints)
ClientKill(this);
}
sprint(this, "all waypoints cleared\n");
return false;
// crude hack to enforce switching weapons
- if(g_cts && item.itemdef.instanceOfWeaponPickup && !CS_CVAR(player).cvar_cl_cts_noautoswitch)
+ if((g_cts || g_ctscup) && item.itemdef.instanceOfWeaponPickup && !CS_CVAR(player).cvar_cl_cts_noautoswitch)
{
for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
{
spawnfunc(trigger_race_checkpoint)
{
vector o;
- if(!g_race && !g_cts) { delete(this); return; }
+ if(!g_race && !g_cts && !g_ctscup) { delete(this); return; }
EXACTTRIGGER_INIT;
void target_checkpoint_setup(entity this)
{
- if(!g_race && !g_cts) { delete(this); return; }
+ if(!g_race && !g_cts && !g_ctscup) { delete(this); return; }
defrag_ents = 1;
// if this is targeted, then it probably isn't a trigger
void race_RetractPlayer(entity this)
{
- if(!g_race && !g_cts)
+ if(!g_race && !g_cts && !g_ctscup)
return;
if(this.race_respawn_checkpoint == 0 || this.race_respawn_checkpoint == race_timed_checkpoint)
race_ClearTime(this);
spawnfunc(info_player_race)
{
- if(!g_race && !g_cts) { delete(this); return; }
+ if(!g_race && !g_cts && !g_ctscup) { delete(this); return; }
++race_spawns;
spawnfunc_info_player_deathmatch(this);
spawnfunc(trigger_race_penalty)
{
// TODO: find out why this wasnt done:
- //if(!g_cts && !g_race) { remove(this); return; }
+ //if(!g_race && !g_cts && !g_ctscup) { remove(this); return; }
EXACTTRIGGER_INIT;
}
}
- if(!found && !g_cts)
+ if(!found && !g_cts && !g_ctscup)
{
LOG_TRACE("WARNING: spawnpoint at ", vtos(spot.origin), " could not find its target ", spot.target);
return '-1 0 0';
BADCVAR("g_conquest_teams");
BADCVAR("g_ctf");
BADCVAR("g_cts");
+ BADCVAR("g_ctscup");
BADCVAR("g_dotc");
BADCVAR("g_dm");
BADCVAR("g_domination");