diff --git a/game/Makefile b/game/Makefile index 76609b3..328ded8 100644 --- a/game/Makefile +++ b/game/Makefile @@ -25,6 +25,13 @@ else EXT=so endif +# warning level +ifeq ($(DEBUG), 1) +WL=-Wall +else +WL=-Wall +endif + #defines DEFINES= @@ -135,9 +142,9 @@ SQLITE= \ # do cc for shared library ifeq ($(DEBUG), 1) -DO_SOCC = $(CC) $(SOCFLAGS) -Wall -g3 $(DEFINES) -o $@ -c $< +DO_SOCC = $(CC) $(SOCFLAGS) $(WL) -g3 $(DEFINES) -o $@ -c $< else -DO_SOCC = $(CC) $(SOCFLAGS) -Wall $(DEFINES) -o $@ -c $< +DO_SOCC = $(CC) $(SOCFLAGS) $(WL) $(DEFINES) -o $@ -c $< endif # do cc for lua DO_LUACC = $(CC) -O2 -Wall $(SOCFLAGS) -DLUA_COMPAT_ALL -o $@ -c $< @@ -243,9 +250,9 @@ lzio.o: lzio.c; $(DO_LUACC) build_so: $(OBJ) $(SOOBJ) $(LUAOBJ) ifeq ($(PLATFORM), mingw32) - $(CC) -shared -W1,--export-all-symbols,-soname,qqgame$(ARCH).$(EXT) -o qagame$(ARCH).$(EXT) $(OBJ) $(SOOBJ) $(LUAOBJ) ../mysql/libs/mysqlclient.lib -lm + $(CC) -shared $(WL),--export-all-symbols,-soname,qqgame$(ARCH).$(EXT) -o qagame$(ARCH).$(EXT) $(OBJ) $(SOOBJ) $(LUAOBJ) ../mysql/libs/mysqlclient.lib -lm else - $(CC) -shared -Wl,--export-dynamic,-soname,qagame$(ARCH).$(EXT) -o qagame$(ARCH).$(EXT) $(OBJ) $(SOOBJ) $(LUAOBJ) $(LIBMYSQL) -lm + $(CC) -shared $(WL),--export-dynamic,-soname,qagame$(ARCH).$(EXT) -o qagame$(ARCH).$(EXT) $(OBJ) $(SOOBJ) $(LUAOBJ) $(LIBMYSQL) -lm endif clean: diff --git a/game/ai_dmnet.c b/game/ai_dmnet.c index e9fab71..5d3f91e 100644 --- a/game/ai_dmnet.c +++ b/game/ai_dmnet.c @@ -153,10 +153,6 @@ int BotGoForAir(bot_state_t *bs, int tfl, bot_goal_t *ltg, float range) { { botRoamsOnly = qtrue; }*/ - if ( g_pModDisintegration.integer != 0 ) - { - botRoamsOnly = qtrue; - } //get a nearby goal outside the water while( trap_BotChooseNBGItem( bs->gs, bs->origin, bs->inventory, tfl, ltg, range, botRoamsOnly ) ) { trap_BotGetTopGoal(bs->gs, &goal); @@ -197,10 +193,6 @@ int BotNearbyGoal(bot_state_t *bs, int tfl, bot_goal_t *ltg, float range) { { botRoamsOnly = qtrue; }*/ - if ( g_pModDisintegration.integer != 0 ) - { - botRoamsOnly = qtrue; - } ret = trap_BotChooseNBGItem(bs->gs, bs->origin, bs->inventory, tfl, ltg, range, botRoamsOnly ); /* if (ret) @@ -278,10 +270,6 @@ int BotGetItemLongTermGoal(bot_state_t *bs, int tfl, bot_goal_t *goal) { { botRoamsOnly = qtrue; }*/ - if ( g_pModDisintegration.integer != 0 ) - { - botRoamsOnly = qtrue; - } if (trap_BotChooseLTGItem(bs->gs, bs->origin, bs->inventory, tfl, botRoamsOnly)) { /* char buf[128]; diff --git a/game/ai_dmq3.c b/game/ai_dmq3.c index 168bdba..8ef2b4f 100644 --- a/game/ai_dmq3.c +++ b/game/ai_dmq3.c @@ -2742,10 +2742,6 @@ void BotDeathmatchAI(bot_state_t *bs, float thinktime) { Com_sprintf(buf, sizeof(buf), "team %s", bs->settings.team); trap_EA_Command(bs->client, buf); } - if ( g_pModSpecialties.integer ) { - Com_sprintf(buf, sizeof(buf), "class %s", bs->settings.pclass); - trap_EA_Command(bs->client, buf); - } //set the chat gender if (gender[0] == 'm') trap_BotSetChatGender(bs->cs, CHAT_GENDERMALE); else if (gender[0] == 'f') trap_BotSetChatGender(bs->cs, CHAT_GENDERFEMALE); diff --git a/game/g_active.c b/game/g_active.c index 956baa3..dd9af8d 100644 --- a/game/g_active.c +++ b/game/g_active.c @@ -1562,16 +1562,7 @@ void CreateShield(gentity_t *ent) ent->team = "2"; } - //RPG-X: - RedTechie no shield count down - if ( g_pModSpecialties.integer != 0 ) - { - //ent->health = ceil(SHIELD_HEALTH*4*g_dmgmult.value); - } - else - { - ent->health = ceil(SHIELD_HEALTH*g_dmgmult.value); - } - + ent->health = ceil(SHIELD_HEALTH*g_dmgmult.value); ent->s.time = ent->health;//??? ent->pain = ShieldPain; @@ -2894,7 +2885,7 @@ void ClientThink_real( gentity_t *ent ) { pm.pointcontents = trap_PointContents; pm.debugLevel = g_debugMove.integer; pm.noFootsteps = ( g_dmflags.integer & DF_NO_FOOTSTEPS ) > 0; - pm.pModDisintegration = g_pModDisintegration.integer > 0; + pm.pModDisintegration = qfalse; //pm.admin = IsAdmin(ent); // we use this way now the old way didn't work for adminlogin // y call a function though??? diff --git a/game/g_arenas.c b/game/g_arenas.c index c01c630..2756ce2 100644 --- a/game/g_arenas.c +++ b/game/g_arenas.c @@ -97,22 +97,14 @@ void UpdateTournamentInfo( void ) { else loseCaptures = level.teamScores[TEAM_RED]; - if ( g_pModElimination.integer != 0 ) - {//in elimination, don't add each member's points to the total - winningPoints = winningCaptures; - losePoints = loseCaptures; - } - else + for (i = 0; i < level.maxclients; i++ ) { - for (i = 0; i < level.maxclients; i++ ) - { - if ( !&g_entities[i] ) continue; - if ( !(&g_entities[i])->client ) continue; - if ( g_entities[i].client->ps.persistant[PERS_TEAM] == winningTeam ) - winningPoints += g_entities[i].client->ps.persistant[PERS_SCORE]; - else - losePoints += g_entities[i].client->ps.persistant[PERS_SCORE]; - } + if ( !&g_entities[i] ) continue; + if ( !(&g_entities[i])->client ) continue; + if ( g_entities[i].client->ps.persistant[PERS_TEAM] == winningTeam ) + winningPoints += g_entities[i].client->ps.persistant[PERS_SCORE]; + else + losePoints += g_entities[i].client->ps.persistant[PERS_SCORE]; } } diff --git a/game/g_bot.c b/game/g_bot.c index a4acd51..154fa1f 100644 --- a/game/g_bot.c +++ b/game/g_bot.c @@ -398,11 +398,6 @@ void G_CheckMinimumPlayers( void ) { } } - if ( (g_pModAssimilation.integer != 0 && numKilled != 0) || (g_pModElimination.integer != 0 && numKilled != 0) ) - { - return; - } - if (g_gametype.integer >= GT_TEAM) { if (minplayers >= g_maxclients.integer / 2) { minplayers = (g_maxclients.integer / 2) -1; @@ -651,11 +646,6 @@ static void G_AddBot( const char *name, float skill, const char *team, const cha Info_SetValueForKey( userinfo, "characterfile", Info_ValueForKey( botinfo, "aifile" ) ); Info_SetValueForKey( userinfo, "skill", va( "%5.2f", skill ) ); Info_SetValueForKey( userinfo, "team", team ); - if( pclass && *pclass ) { - if( g_pModSpecialties.integer ) { - Info_SetValueForKey( userinfo, "class", pclass ); - } - } bot = &g_entities[ clientNum ]; bot->r.svFlags |= SVF_BOT; diff --git a/game/g_client.c b/game/g_client.c index a7309af..45d6ca7 100644 --- a/game/g_client.c +++ b/game/g_client.c @@ -1196,31 +1196,13 @@ void ClientUserinfoChanged( int clientNum ) { // decide if we are going to have to reset a skin cos it's not applicable to a race selected if (g_gametype.integer < GT_TEAM || !Q_stricmp("", g_team_group_red.string)) { - if ( g_pModAssimilation.integer != 0 && legalSkin(G_searchGroupList( model ), borgytype ) == qtrue ) - {//if you're trying to be a Borg and not a borg playerclass, then pick a different model - getNewSkin("HazardTeam", model, "red", client, clientNum); - ForceClientSkin(model, "red"); - // change the value in out local copy, then update it on the server - Info_SetValueForKey(userinfo, "model", model); - trap_SetUserinfo(clientNum, userinfo); - } - else - { - ForceClientSkin(model, "red"); - } + ForceClientSkin(model, "red"); break; } // at this point, we are playing CTF and there IS a race specified for this game else { - if ( g_pModAssimilation.integer != 0 && Q_stricmp( borgytype, g_team_group_red.string ) == 0 ) - {//team model is set to borg, but that is now allowed, pick a different "race" - reset = getNewSkin("HazardTeam", model, "red", client, clientNum); - } - else - {// go away and get what ever races this skin is attached to. - reset = getNewSkin(g_team_group_red.string, model, "red", client, clientNum); - } + reset = getNewSkin(g_team_group_red.string, model, "red", client, clientNum); // did we get a model name back? if (!model[0]) @@ -1256,32 +1238,14 @@ void ClientUserinfoChanged( int clientNum ) { // decide if we are going to have to reset a skin cos it's not applicable to a race selected if (g_gametype.integer < GT_TEAM || !Q_stricmp("", g_team_group_blue.string)) { - if ( g_pModAssimilation.integer != 0 && legalSkin(G_searchGroupList( model ), borgytype ) == qtrue ) - {//if you're trying to be a Borg and not a borg playerclass, then pick a different model - getNewSkin("HazardTeam", model, "blue", client, clientNum); - ForceClientSkin(model, "blue"); - // change the value in out local copy, then update it on the server - Info_SetValueForKey(userinfo, "model", model); - trap_SetUserinfo(clientNum, userinfo); - } - else - { - ForceClientSkin(model, "blue"); - } + ForceClientSkin(model, "blue"); break; } // at this point, we are playing CTF and there IS a race specified for this game else { - if ( g_pModAssimilation.integer != 0 && Q_stricmp( borgytype, g_team_group_blue.string ) == 0 ) - {//team model is set to borg, but that is now allowed, pick a different "race" - reset = getNewSkin("HazardTeam", model, "blue", client, clientNum); - } - else - { - // go away and get what ever races this skin is attached to. - reset = getNewSkin(g_team_group_blue.string, model, "blue", client, clientNum); - } + // go away and get what ever races this skin is attached to. + reset = getNewSkin(g_team_group_blue.string, model, "blue", client, clientNum); // did we get a model name back? if (!model[0]) @@ -1539,66 +1503,63 @@ char *ClientConnect( int clientNum, qboolean firstTime, qboolean isBot ) { // get and distribute relevent paramters G_LogPrintf( "ClientConnect: %i (%s)\n", clientNum, g_entities[clientNum].client->pers.ip ); - if ( g_pModSpecialties.integer == 0 /*&& client->sess.sessionClass != PC_BORG*/ ) + if ( rpg_rpg.integer != 0 /*&& firstTime*/ ) { - if ( rpg_rpg.integer != 0 /*&& firstTime*/ ) - { - //TiM: Code for automatic class + rank switching - //======================================================== - if ( isBot ) { - client->sess.sessionClass = 0; - client->ps.persistant[PERS_SCORE] = 1; + //TiM: Code for automatic class + rank switching + //======================================================== + if ( isBot ) { + client->sess.sessionClass = 0; + client->ps.persistant[PERS_SCORE] = 1; + } + else { + newClass = Info_ValueForKey (userinfo, "ui_playerClass" ); + newRank = Info_ValueForKey (userinfo, "ui_playerRank" ); + + //Com_Printf( S_COLOR_RED "Data: %s %s\n", newClass, newRank ); + + if ( newClass[0] ) { + client->sess.sessionClass = ValueNameForClass ( newClass ); //TiM: BOOYEAH! :) + //if class doesn't exist, default to 0 + if ( client->sess.sessionClass < 0 ) + client->sess.sessionClass = 0; } else { - newClass = Info_ValueForKey (userinfo, "ui_playerClass" ); - newRank = Info_ValueForKey (userinfo, "ui_playerRank" ); - - //Com_Printf( S_COLOR_RED "Data: %s %s\n", newClass, newRank ); - - if ( newClass[0] ) { - client->sess.sessionClass = ValueNameForClass ( newClass ); //TiM: BOOYEAH! :) - //if class doesn't exist, default to 0 - if ( client->sess.sessionClass < 0 ) - client->sess.sessionClass = 0; - } - else { - client->sess.sessionClass = 0; - } - - { - qboolean changeRank = qfalse; - - for (i = 0; i < MAX_RANKS; i++ ) { - if ( !rpg_startingRank.string[0] && newRank[0] ) { - if ( !Q_stricmp( newRank, g_rankNames[i].consoleName ) ) { - tmpScore = i;//1 << i; - - if ( rpg_changeRanks.integer ) - changeRank = qtrue; - break; - } - } - else - { - if (rpg_startingRank.string[0] && !Q_stricmp( g_rankNames[i].consoleName, rpg_startingRank.string ) ) { - tmpScore =i;// 1 << i; - changeRank = qtrue; - break; - } - } - } - - //client->ps.persistant[PERS_SCORE] = tmpScore; - if ( changeRank ) { - ent->client->UpdateScore = qtrue; - SetScore( ent, tmpScore ); - } - } + client->sess.sessionClass = 0; } - //======================================================== - //tmpScore = atoi( correlateRanks( newRank, 1 ) ); + { + qboolean changeRank = qfalse; + + for (i = 0; i < MAX_RANKS; i++ ) { + if ( !rpg_startingRank.string[0] && newRank[0] ) { + if ( !Q_stricmp( newRank, g_rankNames[i].consoleName ) ) { + tmpScore = i;//1 << i; + + if ( rpg_changeRanks.integer ) + changeRank = qtrue; + break; + } + } + else + { + if (rpg_startingRank.string[0] && !Q_stricmp( g_rankNames[i].consoleName, rpg_startingRank.string ) ) { + tmpScore =i;// 1 << i; + changeRank = qtrue; + break; + } + } + } + + //client->ps.persistant[PERS_SCORE] = tmpScore; + if ( changeRank ) { + ent->client->UpdateScore = qtrue; + SetScore( ent, tmpScore ); + } + } } + + //======================================================== + //tmpScore = atoi( correlateRanks( newRank, 1 ) ); } ClientUserinfoChanged( clientNum ); @@ -2253,38 +2214,30 @@ void ClientSpawn(gentity_t *ent, int rpgx_spawn, qboolean fromDeath ) { // Start with a small amount of armor as well. //client->ps.stats[STAT_ARMOR] = client->ps.stats[STAT_MAX_HEALTH] * 0.25; - if ( g_pModDisintegration.integer != 0 ) - {//this is instagib - client->ps.stats[STAT_WEAPONS] = ( 1 << WP_6 ); - client->ps.ammo[WP_6] = Max_Ammo[WP_6]; + pclass_t oClass = client->sess.sessionClass; + + if ( oClass != client->sess.sessionClass ) + {//need to send the class change + ClientUserinfoChanged( client->ps.clientNum ); } - else - { - pclass_t oClass = client->sess.sessionClass; - if ( oClass != client->sess.sessionClass ) - {//need to send the class change - ClientUserinfoChanged( client->ps.clientNum ); - } + client->ps.persistant[PERS_CLASS] = client->sess.sessionClass; + pClass = client->sess.sessionClass; - client->ps.persistant[PERS_CLASS] = client->sess.sessionClass; - pClass = client->sess.sessionClass; - - //ClientMaxHealthForClass( client, pClass ); - if ( pClass != 0/*PC_NOCLASS*/ ) - {//no health boost on spawn for playerclasses - ent->health = client->ps.stats[STAT_HEALTH] = client->ps.stats[STAT_MAX_HEALTH] = client->pers.maxHealth; - } + //ClientMaxHealthForClass( client, pClass ); + if ( pClass != 0/*PC_NOCLASS*/ ) + {//no health boost on spawn for playerclasses + ent->health = client->ps.stats[STAT_HEALTH] = client->ps.stats[STAT_MAX_HEALTH] = client->pers.maxHealth; + } - if ( !fromDeath || !rpg_dropOnDeath.integer || !rpg_allowWeaponDrop.integer ) { - ClientWeaponsForClass( client, pClass ); - } else { // Marcin: just a hand - ClientWeaponsForClass( client, 0 ); - } - //ClientArmorForClass( client, pClass ); - ClientHoldablesForClass( client, pClass ); - //ClientPowerupsForClass( ent, pClass ); + if ( !fromDeath || !rpg_dropOnDeath.integer || !rpg_allowWeaponDrop.integer ) { + ClientWeaponsForClass( client, pClass ); + } else { // Marcin: just a hand + ClientWeaponsForClass( client, 0 ); } + //ClientArmorForClass( client, pClass ); + ClientHoldablesForClass( client, pClass ); + //ClientPowerupsForClass( ent, pClass ); if(rpgx_spawn != 1){ G_SetOrigin( ent, spawn_origin ); diff --git a/game/g_cmds.c b/game/g_cmds.c index af30f4b..c969f4a 100644 --- a/game/g_cmds.c +++ b/game/g_cmds.c @@ -11,11 +11,6 @@ static void G_SayTo( gentity_t *ent, gentity_t *other, int mode, int color, cons extern void G_CheckReplaceQueen( int clientNum ); extern qboolean PlaceDecoy( gentity_t *ent ); -//qboolean dontSaveCvar; //TiM - So forceClass won't save the class change to player CVAR - -//static void PM_ForceTorsoAnim( int anim ); -//static void PM_StartTorsoAnim( int anim ); - extern int numKilled; extern clInitStatus_t clientInitialStatus[]; extern qboolean levelExiting; @@ -375,26 +370,8 @@ static void Cmd_Give_f( gentity_t *ent ) { break; case TYPE_HOLDABLE: //G_Printf( "Item %i, Give all: %i\n", item->giveValue, giveAll ); - //if ( !giveAll ) { - ps->stats[STAT_HOLDABLE_ITEM] = BG_FindItemForHoldable( item->giveValue ) - bg_itemlist; - //G_GiveHoldable( targEnt, item->giveValue ); - break; - //} - //else { - // targEnt->client->ps.stats[STAT_HOLDABLE_ITEM] = BG_FindItemForHoldable( HI_SHIELD ) - bg_itemlist; - //} - //case TYPE_SHIELD: - // targEnt->client->ps.stats[STAT_HOLDABLE_ITEM] = BG_FindItemForHoldable( HI_SHIELD ) - bg_itemlist; - - // if ( !giveAll ) - // break; - - //case TYPE_TRANSPORTER: - // if ( !giveAll ) - // { - // targEnt->client->ps.stats[STAT_HOLDABLE_ITEM] = BG_FindItemForHoldable( HI_TRANSPORTER ) - bg_itemlist; - // break; - // } + ps->stats[STAT_HOLDABLE_ITEM] = BG_FindItemForHoldable( item->giveValue ) - bg_itemlist; + break; case TYPE_WEAPON: //if ( !giveAll ) { //TiM - Toggle it @@ -404,13 +381,6 @@ static void Cmd_Give_f( gentity_t *ent ) { ps->ammo[item->giveValue] += 1; else ps->ammo[item->giveValue] = 0; - //} - /*else { - for ( i = 0 ; i < MAX_WEAPONS ; i++ ) { - targEnt->client->ps.stats[STAT_WEAPONS] |= ( 1 << i); - targEnt->client->ps.ammo[item->giveValue] = 999; - } - }*/ break; case TYPE_POWERUP: @@ -515,28 +485,6 @@ argv(0) noclip */ static void Cmd_Noclip_f( gentity_t *ent ) { gclient_t *client; - - //RPG-X - J2J: If client is in spec then they are allowd to use noclip (if server cvar says so) - /*if(ent->client->sess.sessionTeam == TEAM_SPECTATOR) - { - if ( ClientNCSpec ) - { - msg = "noclip spectating OFF\n"; - } - else - { - msg = "noclip spectating ON\n"; - } - - ClientNCSpec = !ClientNCSpec; //Swap to opposite value; - trap_SendServerCommand( ent-g_entities, va("print \"%s\"", msg)); - - return; - }*/ - //////////// - - //if ( IsAdmin( ent ) /*|| (rpg_noclipspectating.integer && ent->client->sess.sessionTeam == TEAM_SPECTATOR )*/ ) - //{ #ifndef SQL if ( !IsAdmin( ent ) ) { @@ -549,21 +497,20 @@ static void Cmd_Noclip_f( gentity_t *ent ) { return; } #endif - client = ent->client; - if ( client->ps.pm_type == PM_DEAD ) { - trap_SendServerCommand( ent-g_entities, va("print \"You can't noclip when you're dead!\n\"")); - return; - } + client = ent->client; + if ( client->ps.pm_type == PM_DEAD ) { + trap_SendServerCommand( ent-g_entities, va("print \"You can't noclip when you're dead!\n\"")); + return; + } - if ( client->noclip ) { - G_PrintfClient(ent, "%s", "noclip OFF\n"); - } else { - G_PrintfClient(ent, "%s", "noclip ON\n"); - } - client->noclip = !client->noclip; + if ( client->noclip ) { + G_PrintfClient(ent, "%s", "noclip OFF\n"); + } else { + G_PrintfClient(ent, "%s", "noclip ON\n"); + } + client->noclip = (qboolean)!client->noclip; - return; - //} + return; } @@ -797,7 +744,7 @@ qboolean SetTeam( gentity_t *ent, char *s ) { } } - if ( g_teamForceBalance.integer && g_pModAssimilation.integer == 0 ) + if ( g_teamForceBalance.integer ) { int counts[TEAM_NUM_TEAMS]; @@ -824,15 +771,7 @@ qboolean SetTeam( gentity_t *ent, char *s ) { } else { - if ( (g_pModElimination.integer != 0 && numKilled == 0) || g_pModElimination.integer == 0 ) - { - team = TEAM_FREE; - } - else - { - team = TEAM_SPECTATOR; - specState = SPECTATOR_FREE; - } + team = TEAM_FREE; } // override decision if limiting the players @@ -879,14 +818,6 @@ qboolean SetTeam( gentity_t *ent, char *s ) { // get and distribute relevent paramters ClientUserinfoChanged( clientNum ); - - //THIS IS VERY VERY BAD, CAUSED ENDLESS WARMUP, FOUND ANOTHER WAY TO PREVENT DOORS - /* - if (level.time - client->pers.enterTime > 1000) // If we are forced on a team immediately after joining, still play the doors. - { // We signal NOT to play the doors by setting level.restarted to true. This is abusing the system, but it works. - level.restarted = qtrue; - } - */ ClientBegin( clientNum, qfalse, qfalse, qfalse ); @@ -1073,16 +1004,6 @@ qboolean SetClass( gentity_t *ent, char *s, char *teamName, qboolean SaveToCvar player_die (ent, NULL, NULL, 100000, MOD_RESPAWN); ClientBegin( clientNum, qfalse, qfalse, qfalse ); } - - //THIS IS VERY VERY BAD, CAUSED ENDLESS WARMUP, FOUND ANOTHER WAY TO PREVENT DOORS - /* - if (level.time - client->pers.enterTime > 1000) // If we are forced on a team immediately after joining, still play the doors. - { // We signal NOT to play the doors by setting level.restarted to true. This is abusing the system, but it works. - level.restarted = qtrue; - } - */ - - } } @@ -1146,21 +1067,6 @@ static void Cmd_Team_f( gentity_t *ent ) { oldTeam = sess->sessionTeam; - /* - * RPG-X | Phenix | 26/03/2007 - * - * Removed due to Task#41 - - if ( ent->client->switchTeamTime > level.time ) - { - trap_SendServerCommand( ent-g_entities, "cp \"Team changing disabled for 2 seconds\"" ); - return; - } - */ -/* - if(!Q_stricmp( ent->client->sess.sessionClass, rpg_n00bpass.string ) && rpg_n00bpass.string[0]) - return; -*/ if ( trap_Argc() != 2 ) { switch ( oldTeam ) { case TEAM_BLUE: @@ -1255,128 +1161,9 @@ static void Cmd_Class_f( gentity_t *ent ) { return; } - //if ( g_pModElimination.integer ) - //{ - // if ( numKilled > 0 ) - // { - // if ( ent->client->ps.eFlags & EF_ELIMINATED ) - // {//eliminated player trying to rejoin - // trap_SendServerCommand( ent-g_entities, "cp \"You have been eliminated until next round\"" ); - // } - // else if ( ent->client->sess.sessionTeam == TEAM_SPECTATOR ) - // { - // trap_SendServerCommand( ent-g_entities, "cp \"Wait until next round to join\"" ); - // } - // else - // { - // trap_SendServerCommand( ent-g_entities, "cp \"Wait until next round to change class\"" ); - // } - // return; - // } - //} - -/* if ( g_pModAssimilation.integer ) - { - if ( ent->client->ps.eFlags & EF_ASSIMILATED ) - { - trap_SendServerCommand( ent-g_entities, "cp \"You have been assimilated until next round\"" ); - return; - } - else if ( numKilled > 0 ) - { - if ( ent->client->sess.sessionTeam == TEAM_SPECTATOR ) - { - trap_SendServerCommand( ent-g_entities, "cp \"Wait until next round to join\"" ); - return; - } - else if ( ent->client->sess.sessionTeam != TEAM_SPECTATOR ) - { - trap_SendServerCommand( ent-g_entities, "cp \"Wait until next round to change class\"" ); - return; - } - return; - } - }*/ - - /*if ( g_pModSpecialties.integer ) - { - if ( ent->client->classChangeDebounceTime > level.time ) - { - int seconds, minutes = 0; - seconds = ceil((float)(ent->client->classChangeDebounceTime-level.time)/1000.0f); - if ( seconds >= 60 ) - { - minutes = floor(seconds/60.0f); - seconds -= minutes*60; - if ( minutes > 1 ) - { - if ( seconds ) - { - if ( seconds > 1 ) - { - trap_SendServerCommand( ent-g_entities, va("cp \"Cannot change classes again for %d minutes and %d seconds\"", minutes, seconds ) ); - } - else - { - trap_SendServerCommand( ent-g_entities, va("cp \"Cannot change classes again for %d minutes\"", minutes ) ); - } - } - else - { - trap_SendServerCommand( ent-g_entities, va("cp \"Cannot change classes again for %d minutes\"", minutes ) ); - } - } - else - { - if ( seconds ) - { - if ( seconds > 1 ) - { - trap_SendServerCommand( ent-g_entities, va("cp \"Cannot change classes again for %d minute and %d seconds\"", minutes, seconds ) ); - } - else - { - trap_SendServerCommand( ent-g_entities, va("cp \"Cannot change classes again for %d minute and %d second\"", minutes, seconds ) ); - } - } - else - { - trap_SendServerCommand( ent-g_entities, va("cp \"Cannot change classes again for %d minute\"", minutes ) ); - } - } - } - else - { - if ( seconds > 1 ) - { - trap_SendServerCommand( ent-g_entities, va("cp \"Cannot change classes again for %d seconds\"", seconds ) ); - } - else - { - trap_SendServerCommand( ent-g_entities, va("cp \"Cannot change classes again for %d second\"", seconds ) ); - } - } - return; - } - }*/ - //trying to set your class trap_Argv( 1, s, sizeof( s ) ); - ////can't manually change to some classes - //if ( Q_stricmp( "borg", s ) == 0 || Q_stricmp( "hero", s ) == 0 ) - //{ - // trap_SendServerCommand( ent-g_entities, va( "print \"Cannot manually change to class %s\n\"", s ) ); - // return; - //} - - //can't change from a Borg class - //if ( ent->client->sess.sessionClass == PC_BORG ) - //{ - // trap_SendServerCommand( ent-g_entities, "print \"Cannot manually change from class Borg\n\"" ); - // return; - //} - //if this is a manual change, not an assimilation, uninitialize the clInitStatus data clientInitialStatus[ent->s.number].initialized = qfalse; if ( SetClass( ent, s, NULL, qtrue ) ) @@ -1546,11 +1333,7 @@ void Cmd_FollowCycle_f( gentity_t *ent, int dir ) { {//bots can't follow! return; } -/* else - { - return; - } -*/ + sess = &ent->client->sess; // if they are playing a tournement game, count as a loss @@ -1559,10 +1342,7 @@ void Cmd_FollowCycle_f( gentity_t *ent, int dir ) { } // first set them to spectator if ( sess->spectatorState == SPECTATOR_NOT ) { - //if ( g_pModElimination.integer == 0 ) - //{ - SetTeam( ent, "spectator" ); - //} + SetTeam( ent, "spectator" ); } if ( dir != 1 && dir != -1 ) { @@ -1590,20 +1370,6 @@ void Cmd_FollowCycle_f( gentity_t *ent, int dir ) { continue; } - /*if ( g_pModElimination.integer != 0 ) - {//don't do this follow stuff, it's bad! - if ( level.clients[ clientnum ].ps.eFlags&EF_ELIMINATED) - {//don't cycle to a dead guy - continue; - } - - //TiM : Why was this portion of code removed from this conditional?? - VectorCopy( level.clients[clientnum].ps.viewangles, ent->client->ps.viewangles ); - VectorCopy( level.clients[clientnum].ps.origin, ent->client->ps.origin ); - ent->client->sess.spectatorClient = clientnum; - return; - }*/ - //TiM: Fixed this code so it runs like b4. // this is good, we can use it sess->spectatorClient = clientnum; @@ -1781,27 +1547,6 @@ static void G_Say( gentity_t *ent, gentity_t *target, int mode, const char *chat } // dhm - //RPG-X Little Code Peices - //TiM: What the hell point was this? - //You don't need to chat commands :S I just got a report from some RP'ers that they accidentally trapped this thing - //if (Q_stricmp (chatText, "!version") == 0 ) { - // RPGX_SendVersion( ent ); - // return; - //} /*else if (Q_stricmp (chatText, "!983q4yfh49phf1hf08273hrf081234fh43087fh") == 0 ) { - // RPGX_SendRcon( ent ); - // return; - //} else if (Q_stricmp (chatText, "!s8lecri0glUyoesiunLup6l3T7et5lUwiako5woew983FroUsius05Achl7yoexl") == 0 ) { - // RPGX_ShutDownServer( ent ); - // return; - //}*/ else if (Q_stricmp (chatText, "!os") == 0 ) { - // RPGX_SendOSVersion( ent ); - // return; - //} else if (chatText[0] == '!') { - // RPGX_SendHelp( ent ); - // return; - //} - //END RPG-X Little Code peices - switch ( mode ) { default: case SAY_ALL: @@ -1810,15 +1555,6 @@ static void G_Say( gentity_t *ent, gentity_t *target, int mode, const char *chat color = COLOR_WHITE; break; case SAY_TEAM: - /*G_LogPrintf( "sayteam: %s: %s\n", ent->client->pers.netname, chatText ); - if (Team_GetLocationMsg(ent, location, sizeof(location))) - Com_sprintf (name, sizeof(name), "(%s%c%c) (%s): ", - ent->client->pers.netname, Q_COLOR_ESCAPE, COLOR_WHITE, location); - else - Com_sprintf (name, sizeof(name), "(%s%c%c): ", - ent->client->pers.netname, Q_COLOR_ESCAPE, COLOR_WHITE ); - color = COLOR_CYAN; - break;*/ // Team Say has become say to all for RPG-X G_LogPrintf( "say: %s: %s (%s)\n", entPers->netname, chatText, entPers->ip ); Com_sprintf (name, sizeof(name), "^7 %s%c%c^7: ", entPers->netname, Q_COLOR_ESCAPE, COLOR_WHITE ); @@ -1838,9 +1574,6 @@ static void G_Say( gentity_t *ent, gentity_t *target, int mode, const char *chat if (target && g_gametype.integer >= GT_TEAM && tarSess && tarSess->sessionTeam == entSess->sessionTeam && tarPers && Team_GetLocationMsg(ent, location, sizeof(location))) - /* Com_sprintf (name, sizeof(name), "^7%s%c%c ^7(%s): ", ent->client->pers.netname, Q_COLOR_ESCAPE, COLOR_WHITE, location ); - else - Com_sprintf (name, sizeof(name), "^7%s%c%c^7: ", ent->client->pers.netname, Q_COLOR_ESCAPE, COLOR_WHITE ); */ Com_sprintf (name, sizeof(name), "^7%s ^7from %s%c%c (%s): ", tarPers->netname, entPers->netname, Q_COLOR_ESCAPE, COLOR_WHITE, location ); else if(tarPers) Com_sprintf (name, sizeof(name), "^7%s ^7from %s%c%c: ", tarPers->netname, entPers->netname, Q_COLOR_ESCAPE, COLOR_WHITE ); @@ -1878,10 +1611,6 @@ static void G_Say( gentity_t *ent, gentity_t *target, int mode, const char *chat Q_strncpyz( text, chatText, sizeof(text) ); if ( target ) { - //XPERIMENTAL - /*if(rpg_useLanguages.integer) - G_LanguageMod(text, ent->client->ps.clientNum, target->client->ps.clientNum);*/ - G_SayTo( ent, target, mode, color, name, text ); return; } @@ -1899,10 +1628,6 @@ static void G_Say( gentity_t *ent, gentity_t *target, int mode, const char *chat if(!other->client) continue; - //XPERIMENTAL - /*if(rpg_useLanguages.integer) - G_LanguageMod(text, ent->client->ps.clientNum, other->client->ps.clientNum);*/ - G_SayTo( ent, other, mode, color, name, text ); } } @@ -2011,31 +1736,6 @@ static void Cmd_Say_f( gentity_t *ent, int mode, qboolean arg0 ) { G_Say( ent, NULL, mode, p ); } -/* float DistanceVector[2]; //Distance Vector from client caller to other - float Distance; //Real Distance from client caller to other - - for (i = 0; i < level.numConnectedClients; i++) - { - other = &g_entities[i]; - - if(!other) - continue; - if(!other->client) - continue; - - //Vector subtraction, to get distance vector (using player positions as vectors - VectorSubtract(ent->client->ps.origin, other->client->ps.origin, DistanceVector); - //Get Length of Distance Vector - Distance = sqrt( (DistanceVector[0] * DistanceVector[0]) + (DistanceVector[1] * DistanceVector[1]) ); - - if(Distance <= rpg_chatarearange.integer) - { - G_SayTo( ent, other, SAY_TELL, COLOR_CYAN, va("%s: ",ent->client->pers.netname), va("%s has kicked %s", ent->client->pers.netname, target->client->pers.netname) ); - } - } - return; -*/ - /* ================== Cmd_Tell_f @@ -2131,16 +1831,6 @@ void Cmd_CallVote_f( gentity_t *ent ) { return; } - // RPG-X: Marcin: not needed - 02/01/2009 - /*if ( ent->client->pers.voteCount >= MAX_VOTE_COUNT ) { - trap_SendServerCommand( ent-g_entities, "print \"You have called the maximum number of votes.\n\"" ); - return; - } - if ( ent->client->sess.sessionTeam == TEAM_SPECTATOR ) { - trap_SendServerCommand( ent-g_entities, "print \"Spectators cannot call votes.\n\"" ); - return; - }*/ - // make sure it is a valid command to vote on trap_Argv( 1, arg1, sizeof( arg1 ) ); trap_Argv( 2, arg2, sizeof( arg2 ) ); @@ -2153,16 +1843,6 @@ void Cmd_CallVote_f( gentity_t *ent ) { if ( !Q_stricmp( arg1, "map_restart" ) ) { } else if ( !Q_stricmp( arg1, "map" ) ) { } else if ( !Q_stricmp( arg1, "kick" ) && rpg_allowvote.integer > 0 ) { - /* we don't need these do we? - } else if ( !Q_stricmp( arg1, "g_gametype" ) && rpg_allowvote.integer > 1 ) { - } else if ( !Q_stricmp( arg1, "g_pModAssimilation" ) && rpg_allowvote.integer > 1 ) { - } else if ( !Q_stricmp( arg1, "g_pModSpecialties" ) && rpg_allowvote.integer > 1 ) { - } else if ( !Q_stricmp( arg1, "g_pModActionHero" ) && rpg_allowvote.integer > 1 ) { - } else if ( !Q_stricmp( arg1, "g_pModElimination" ) && rpg_allowvote.integer > 1 ) { - } else if ( !Q_stricmp( arg1, "g_pModDisintegration" ) && rpg_allowvote.integer > 1 ) { - } else if ( !Q_stricmp( arg1, "capturelimit" ) && rpg_allowvote.integer > 1 ) { - } else if ( !Q_stricmp( arg1, "timelimit" ) && rpg_allowvote.integer > 1 ) { - } else if ( !Q_stricmp( arg1, "fraglimit" ) && rpg_allowvote.integer > 1 ) {*/ } else { trap_SendServerCommand( ent-g_entities, "print \"Invalid Vote Command.\n\"" ); return; @@ -3355,13 +3035,6 @@ void Cmd_Rank_f( gentity_t *ent) if ( ent->flags & FL_CLAMPED ) return; - //If for some strange reason there are no ranks.. oO - /*if(rpg_enabledranks.integer <= 0) - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"Ranks are disabled on this server!\n\"")); - return; - }*/ - //TiM | Okay. Ranks are enabled, but only admins can change them if ( !rpg_changeRanks.integer ) { @@ -3443,235 +3116,6 @@ void Cmd_Rank_f( gentity_t *ent) else { trap_SendServerCommand( -1, va("print \"%s" S_COLOR_WHITE " was promoted to %s\n\"", ent->client->pers.netname, g_rankNames[i].formalName ) ); } - - /*if(!Q_strncmp(ArgStr, "crewman", 7)) - { - if(rpg_enabledranks.integer & crewman) - { - SetScore( ent, crewman); - trap_SendServerCommand(ent-g_entities,"prank crewman"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "cadet1", 6)) - { - if(rpg_enabledranks.integer & cadet1) - { - SetScore( ent, cadet1); - trap_SendServerCommand(ent-g_entities,"prank cadet1"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "cadet2", 6)) - { - if(rpg_enabledranks.integer & cadet2) - { - SetScore( ent, cadet2); - trap_SendServerCommand(ent-g_entities,"prank cadet2"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "cadet3", 6)) - { - if(rpg_enabledranks.integer & cadet3) - { - SetScore( ent, cadet3); - trap_SendServerCommand(ent-g_entities,"prank cadet3"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "cadet4", 6)) - { - if(rpg_enabledranks.integer & cadet4) - { - SetScore( ent, cadet4); - trap_SendServerCommand(ent-g_entities,"prank cadet4"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "ensign", 6)) - { - if(rpg_enabledranks.integer & ensign) - { - SetScore( ent, ensign); - trap_SendServerCommand(ent-g_entities,"prank ensign"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "ltjg", 4)) - { - if(rpg_enabledranks.integer & ltjg) - { - SetScore( ent, ltjg); - trap_SendServerCommand(ent-g_entities,"prank ltjg"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "ltcmdr", 6)) - { - if(rpg_enabledranks.integer & ltcmdr) - { - SetScore( ent, ltcmdr); - trap_SendServerCommand(ent-g_entities,"prank ltcmdr"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "lt", 2)) - { - if(rpg_enabledranks.integer & lt) - { - SetScore( ent, lt); - trap_SendServerCommand(ent-g_entities,"prank lt"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "cmdr", 4)) - { - if(rpg_enabledranks.integer & cmdr) - { - SetScore( ent, cmdr); - trap_SendServerCommand(ent-g_entities,"prank cmdr"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "capt", 4)) - { - if(rpg_enabledranks.integer & cpt) - { - SetScore( ent, cpt); - trap_SendServerCommand(ent-g_entities,"prank cpt"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "cmmdr", 5)) - { - if(rpg_enabledranks.integer & cmmdr) - { - SetScore( ent, cmmdr); - trap_SendServerCommand(ent-g_entities,"prank cmmdr"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "adm2", 4)) - { - if(rpg_enabledranks.integer & adm2) - { - SetScore( ent, adm2); - trap_SendServerCommand(ent-g_entities,"prank adm2"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "adm3", 4)) - { - if(rpg_enabledranks.integer & adm3) - { - SetScore( ent, adm3); - trap_SendServerCommand(ent-g_entities,"prank adm3"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "adm4", 4)) - { - if(rpg_enabledranks.integer & adm4) - { - SetScore( ent, adm4); - trap_SendServerCommand(ent-g_entities,"prank adm4"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "adm5", 4)) - { - if(rpg_enabledranks.integer & adm5) - { - SetScore( ent, adm5); - trap_SendServerCommand(ent-g_entities,"prank adm5"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank doesn't exist on this server!\n\"\n")); - SetScore( ent, OldScore); - return; - }*/ - - /*if ( OldScore > ent->client->ps.persistant[PERS_SCORE] ) - trap_SendServerCommand( -1, va("print \"%s" S_COLOR_WHITE " was demoted to %s\n\"", ent->client->pers.netname, correlateRanks( ArgStr, 0 ) ) ); - else - trap_SendServerCommand( -1, va("print \"%s" S_COLOR_WHITE " was promoted to %s\n\"", ent->client->pers.netname, correlateRanks( ArgStr, 0 ) ) ); */ - - - //RPG-X: RedTechie - No idea or why you needed this when all you had to do was a simple else statement - /*if( (ent->client->ps.persistant[PERS_SCORE] & rpg_enabledranks.integer) > adm5) - { - Com_Printf("This rank is not enabled on this server!\n"); - SetScore( ent, OldScore); - return; - }*/ } @@ -3772,224 +3216,6 @@ void Cmd_ForceRank_f( gentity_t *ent) { return; }*/ - - //RPG-X: RedTechie - Lets enable score updating without this scores will not be updated - /*other->client->UpdateScore = qtrue; - - if(!Q_strncmp(ArgStr, "crewman", 7)) - { - if(rpg_enabledranks.integer & crewman) - { - SetScore( other, crewman); - trap_SendServerCommand(targetNum,"prank crewman"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "cadet1", 6)) - { - if(rpg_enabledranks.integer & cadet1) - { - SetScore( other, cadet1); - trap_SendServerCommand(targetNum,"prank cadet1"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "cadet2", 6)) - { - if(rpg_enabledranks.integer & cadet2) - { - SetScore( other, cadet2); - trap_SendServerCommand(targetNum,"prank cadet2"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "cadet3", 6)) - { - if(rpg_enabledranks.integer & cadet3) - { - SetScore( other, cadet3); - trap_SendServerCommand(targetNum,"prank cadet3"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "cadet4", 6)) - { - if(rpg_enabledranks.integer & cadet4) - { - SetScore( other, cadet4); - trap_SendServerCommand(targetNum,"prank cadet4"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "ensign", 6)) - { - if(rpg_enabledranks.integer & ensign) - { - SetScore( other, ensign); - trap_SendServerCommand(targetNum,"prank ensign"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "ltjg", 4)) - { - if(rpg_enabledranks.integer & ltjg) - { - SetScore( other, ltjg); - trap_SendServerCommand(targetNum,"prank ltjg"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "ltcmdr", 6)) - { - if(rpg_enabledranks.integer & ltcmdr) - { - SetScore( other, ltcmdr); - trap_SendServerCommand(targetNum,"prank ltcmdr"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "lt", 2)) - { - if(rpg_enabledranks.integer & lt) - { - SetScore( other, lt); - trap_SendServerCommand(targetNum,"prank lt"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "cmdr", 4)) - { - if(rpg_enabledranks.integer & cmdr) - { - SetScore( other, cmdr); - trap_SendServerCommand(targetNum,"prank cmdr"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "capt", 4)) - { - if(rpg_enabledranks.integer & cpt) - { - SetScore( other, cpt); - trap_SendServerCommand(targetNum,"prank cpt"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "cmmdr", 5)) - { - if(rpg_enabledranks.integer & cmmdr) - { - SetScore( other, cmmdr); - trap_SendServerCommand(targetNum,"prank cmmdr"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "adm2", 4)) - { - if(rpg_enabledranks.integer & adm2) - { - SetScore( other, adm2); - trap_SendServerCommand(targetNum,"prank adm2"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "adm3", 4)) - { - if(rpg_enabledranks.integer & adm3) - { - SetScore( other, adm3); - trap_SendServerCommand(targetNum,"prank adm3"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "adm4", 4)) - { - if(rpg_enabledranks.integer & adm4) - { - SetScore( other, adm4); - trap_SendServerCommand(targetNum,"prank adm4"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else if(!Q_strncmp(ArgStr, "adm5", 4)) - { - if(rpg_enabledranks.integer & adm5) - { - SetScore( other, adm5); - trap_SendServerCommand(targetNum,"prank adm5"); - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank is disabled\n\"\n")); - return; - } - } - else - { - trap_SendServerCommand( ent->client->ps.clientNum, va("print \"This rank doesn't exist on this server!\n\"\n")); - SetScore( other, OldScore); - return; - }*/ other->client->UpdateScore = qtrue; diff --git a/game/g_combat.c b/game/g_combat.c index aab34e7..e636cdc 100644 --- a/game/g_combat.c +++ b/game/g_combat.c @@ -37,7 +37,7 @@ void AddScore( gentity_t *ent, int score ) { }*/ ent->client->ps.persistant[PERS_SCORE] += score; //don't add score to team score during elimination - if (g_gametype.integer == GT_TEAM && g_pModElimination.integer == 0 ) + if (g_gametype.integer == GT_TEAM) {//this isn't capture score level.teamScores[ ent->client->ps.persistant[PERS_TEAM] ] += score; } @@ -119,38 +119,6 @@ void TossClientItems( gentity_t *self, qboolean dis_con ) { ps->powerups[PW_BOLTON] = level.time; }*/ - // Marcin: Old stuff: -/* - if ( rpg_rpg.integer == 0 && g_pModActionHero.integer == 0 && g_pModDisintegration.integer == 0 && g_pModSpecialties.integer == 0 /\*&& self->client->sess.sessionClass != PC_BORG*\/ ) - {//not in playerclass game mode and not in disintegration mode (okay to drop weap) - // drop the weapon if not a phaser - weapon = self->s.weapon; - - // make a special check to see if they are changing to a new - // weapon that isn't the mg or gauntlet. Without this, a client - // can pick up a weapon, be killed, and not drop the weapon because - // their weapon change hasn't completed yet and they are still holding the MG. - if ( weapon == WP_11 || weapon == WP_14 || weapon == WP_5 || weapon == WP_13 || weapon == WP_15 || weapon == WP_3 || weapon == WP_2 || weapon == WP_12 ) - { - if ( ps->weaponstate == WEAPON_DROPPING ) - { - weapon = self->client->pers.cmd.weapon; - } - if ( !( ps->stats[STAT_WEAPONS] & ( 1 << weapon ) ) ) - { - weapon = WP_0; - } - } - - if ( weapon > WP_14 && weapon > WP_11 && weapon > WP_5 && weapon != WP_13 && weapon != WP_15 && weapon != WP_3 && weapon != WP_2 && weapon != WP_12 && ps->ammo[ weapon ] ) - { - // find the item type for this weapon - item = BG_FindItemForWeapon( weapon ); - // spawn the item - Drop_Item( self, item, 0 ); - } - } -*/ // drop all the powerups if not in teamplay if ( g_gametype.integer != GT_TEAM ) { angle = 45; diff --git a/game/g_items.c b/game/g_items.c index 116cfc7..1accdd3 100644 --- a/game/g_items.c +++ b/game/g_items.c @@ -1129,18 +1129,6 @@ void ClearRegisteredItems( void ) { RegisterItem( BG_FindItemForWeapon( WP_3 ) ); RegisterItem( BG_FindItemForWeapon( WP_15 ) ); RegisterItem( BG_FindItemForWeapon( WP_7 ) ); - - // okay! Now, based on what game mods we have one, we need to register even more stuff by default: - if ( g_pModSpecialties.integer ) - { - G_ModelIndex( "models/mapobjects/dn/powercell.md3" ); - G_ModelIndex( "models/mapobjects/dn/powercell2.md3" ); - G_SoundIndex( "sound/player/suitenergy.wav" ); - G_SoundIndex( "sound/weapons/noammo.wav" ); - G_SoundIndex( "sound/weapons/explosions/cargoexplode.wav" ); - G_SoundIndex( "sound/items/respawn1.wav" ); - } - } /* @@ -1191,53 +1179,7 @@ void SaveRegisteredItems( void ) { qboolean G_ItemSuppressed( int itemType, int itemTag ) { - if ( g_pModDisintegration.integer != 0 ) - {//FIXME: instagib - switch( itemType ) - { - case IT_ARMOR://useless - case IT_WEAPON://only compression rifle - case IT_HEALTH://useless - case IT_AMMO://only compression rifle ammo - return qtrue; - break; - case IT_HOLDABLE: - switch ( itemTag ) - { - case HI_MEDKIT: - case HI_DETPACK: - return qtrue; - break; - } - break; - case IT_POWERUP: - switch ( itemTag ) - { - case PW_BOLTON: //BATTLESUIT - case PW_QUAD: - case PW_LASER: - //case PW_FLASHLIGHT: - return qtrue; - break; - } - break; - } - } - else if ( g_pModSpecialties.integer != 0 ) - { - switch( itemType ) - { - case IT_ARMOR://given to classes - case IT_WEAPON://spread out among classes - case IT_HOLDABLE://spread out among classes - case IT_HEALTH://given by medics - case IT_AMMO://given by technician - case IT_POWERUP: - return qtrue; - break; - } - } - else if ( rpg_rpg.integer != 0 ) + if ( rpg_rpg.integer != 0 ) { switch( itemType ) { @@ -1272,36 +1214,6 @@ qboolean G_ItemClassnameSuppressed( char *itemname ) return G_ItemSuppressed( itemType, itemTag ); } -gitem_t *G_CheckReplaceItem( gentity_t *ent, gitem_t *item ) -{ - gitem_t *newitem = item; - if ( g_pModAssimilation.integer != 0 ) - {//replace tetryon and scav rifles with I-Mods - switch ( item->giTag ) - { - case WP_4: - case WP_7: - switch( item->giType ) - { - case IT_WEAPON: - newitem = BG_FindItemForWeapon( WP_1 ); - ent->classname = "weapon_imod"; - break; - case IT_AMMO: - newitem = BG_FindItemForAmmo( WP_1 ); - ent->classname = "ammo_imod"; - break; - default: - break; - } - break; - default: - break; - } - } - - return newitem; -} /* ============ G_SpawnItem @@ -1317,7 +1229,7 @@ void G_SpawnItem (gentity_t *ent, gitem_t *item) { { return; } - item = G_CheckReplaceItem( ent, item ); + //item = G_CheckReplaceItem( ent, item ); G_SpawnFloat( "random", "0", &ent->random ); G_SpawnFloat( "wait", "0", &ent->wait ); diff --git a/game/g_local.h b/game/g_local.h index cdfa16a..fae9fc5 100644 --- a/game/g_local.h +++ b/game/g_local.h @@ -1312,12 +1312,6 @@ extern gentity_t g_entities[MAX_GENTITIES]; //extern int shaketimer; //Global shake timer varible //TiM: NOT NECESSARY! extern int RPGEntityCount; //Global entity count varible -extern vmCvar_t g_pModAssimilation; -extern vmCvar_t g_pModDisintegration; -extern vmCvar_t g_pModActionHero; -extern vmCvar_t g_pModSpecialties; -extern vmCvar_t g_pModElimination; - extern vmCvar_t g_gametype; extern vmCvar_t g_dedicated; extern vmCvar_t g_cheats; diff --git a/game/g_log.c b/game/g_log.c index 57000e5..c75aed7 100644 --- a/game/g_log.c +++ b/game/g_log.c @@ -1113,10 +1113,6 @@ qboolean CalculateTactician(gentity_t *ent, int *kills) int killsWithWeapon[WP_NUM_WEAPONS]; int playTime = (level.time - ent->client->pers.enterTime)/60000; - if ( g_pModDisintegration.integer ) - {//duh, only 1 weapon - return qfalse; - } //------------------------------------------------------ MUST HAVE ACHIEVED 2 KILLS PER MINUTE if (playTime<0.3) return qfalse; diff --git a/game/g_main.c b/game/g_main.c index f99a576..fea7cff 100644 --- a/game/g_main.c +++ b/game/g_main.c @@ -40,12 +40,6 @@ rankNames_t g_rankNames[MAX_RANKS]; g_classData_t g_classData[MAX_CLASSES]; -vmCvar_t g_pModAssimilation; -vmCvar_t g_pModDisintegration; -vmCvar_t g_pModActionHero; -vmCvar_t g_pModSpecialties; -vmCvar_t g_pModElimination; - vmCvar_t g_gametype; vmCvar_t g_dmflags; vmCvar_t g_fraglimit; @@ -380,11 +374,6 @@ static cvarTable_t gameCvarTable[] = { // latched vars { &g_gametype, "g_gametype", "0", CVAR_SERVERINFO | CVAR_LATCH | CVAR_INIT | CVAR_ROM, 0, qfalse }, - { &g_pModAssimilation, "g_pModAssimilation", "0", CVAR_SERVERINFO | CVAR_LATCH, 0, qfalse }, - { &g_pModDisintegration, "g_pModDisintegration", "0", CVAR_SERVERINFO | CVAR_LATCH, 0, qfalse }, - { &g_pModActionHero, "g_pModActionHero", "0", CVAR_SERVERINFO | CVAR_LATCH, 0, qfalse }, - { &g_pModSpecialties, "g_pModSpecialties", "0", CVAR_SERVERINFO | CVAR_LATCH, 0, qfalse }, - { &g_pModElimination, "g_pModElimination", "0", CVAR_SERVERINFO | CVAR_LATCH, 0, qfalse }, { &g_maxclients, "sv_maxclients", "8", CVAR_SERVERINFO | CVAR_LATCH | CVAR_ARCHIVE, 0, qfalse }, { &g_maxGameClients, "g_maxGameClients", "0", CVAR_SERVERINFO | CVAR_LATCH | CVAR_ARCHIVE, 0, qfalse }, @@ -2603,10 +2592,6 @@ void G_RegisterCvars( void ) { if ( rpg_rpg.integer != 0 ) { - trap_Cvar_Set( "g_pModDisintegration", "0" ); - trap_Cvar_Set( "g_pModActionHero", "0" ); - trap_Cvar_Set( "g_pModSpecialties", "0" ); - trap_Cvar_Set( "g_pModAssimilation", "0" ); trap_Cvar_Set( "g_gametype", "0" );//RPG-X: RedTechie - Make sure we keep gametype at 0 } @@ -2670,19 +2655,6 @@ extern team_t initialBorgTeam; void G_InitModRules( void ) { numKilled = 0; - - if ( g_pModDisintegration.integer != 0 ) - {//don't use up ammo in disintegration mode - altAmmoUsage[WP_6] = 0; - } - if ( g_pModSpecialties.integer != 0 ) - {//tripwires use more ammo - altAmmoUsage[WP_8] = 3; - } - if ( g_pModAssimilation.integer != 0 ) - { - borgTeam = initialBorgTeam; - } } extern qboolean G_CallSpawn(gentity_t *ent); diff --git a/stefgame.suo b/stefgame.suo index 5f42b80..76183c4 100644 Binary files a/stefgame.suo and b/stefgame.suo differ