Skip to content
This repository has been archived by the owner on May 16, 2020. It is now read-only.

Commit

Permalink
mod: clean up refs #51
Browse files Browse the repository at this point in the history
  • Loading branch information
IR4T4 committed Nov 9, 2012
1 parent ea62822 commit 74270f3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 290 deletions.
86 changes: 2 additions & 84 deletions src/game/g_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,6 @@ void Cmd_Give_f(gentity_t *ent)
hasAmount = qtrue;
}
amount = atoi(amt);
//----(SA) end

name = ConcatArgs(1);

Expand Down Expand Up @@ -974,20 +973,7 @@ qboolean SetTeam(gentity_t *ent, char *s, qboolean force, weapon_t w1, weapon_t
}
}

// DHM - Nerve :: Force players to wait 30 seconds before they can join a new team.
// OSP - changed to 5 seconds
// Gordon: disabling if in dev mode: cuz it sucks
// Gordon: bleh, half of these variables don't mean what they used to, so this doesn't work
/* if ( !g_cheats.integer ) {
if ( team != oldTeam && level.warmupTime == 0 && !client->pers.initialSpawn && ( (level.time - client->pers.connectTime) > 10000 ) && ( (level.time - client->pers.enterTime) < 5000 ) && !force ) {
CP(va("cp \"^3You must wait %i seconds before joining ^3a new team.\n\" 3", (int)(5 - ((level.time - client->pers.enterTime)/1000))));
return qfalse;
}
}*/
// dhm

// execute the team change

if (team != TEAM_SPECTATOR)
{
client->pers.initialSpawn = qfalse;
Expand Down Expand Up @@ -2539,7 +2525,6 @@ void Cmd_Vote_f(gentity_t *ent)
ent->client->pers.propositionClient = -1;
ent->client->pers.propositionClient2 = -1;

// dhm
// Reset this ent's complainEndTime so they can't send multiple complaints
ent->client->pers.complaintEndTime = -1;
ent->client->pers.complaintClient = -1;
Expand Down Expand Up @@ -2598,10 +2583,9 @@ void Cmd_Vote_f(gentity_t *ent)

qboolean G_canPickupMelee(gentity_t *ent)
{
// JPW NERVE -- no "melee" weapons in net play
// JPW NERVE -- no "melee" weapons in net play
return qfalse;
}
// jpw

/*
=================
Expand Down Expand Up @@ -3356,60 +3340,6 @@ void Cmd_SetSpawnPoint_f(gentity_t *ent)
}
}

/*
============
Cmd_SetSniperSpot_f
============
*/
// TODO: remove this
void Cmd_SetSniperSpot_f(gentity_t *clent)
{
gentity_t *spot;

vmCvar_t cvar_mapname;
char filename[MAX_QPATH];
fileHandle_t f;
char buf[1024];

if (!g_cheats.integer)
{
return;
}
if (!trap_Cvar_VariableIntegerValue("cl_running"))
{
return; // only allow locally playing client
}
if (clent->s.number != 0)
{
return; // only allow locally playing client

}
// drop a sniper spot here
spot = G_Spawn();
spot->classname = "bot_sniper_spot";
VectorCopy(clent->r.currentOrigin, spot->s.origin);
VectorCopy(clent->client->ps.viewangles, spot->s.angles);
spot->aiTeam = clent->client->sess.sessionTeam;

// output to text file
trap_Cvar_Register(&cvar_mapname, "mapname", "", CVAR_SERVERINFO | CVAR_ROM);

Com_sprintf(filename, sizeof(filename), "maps/%s.botents", cvar_mapname.string);
if (trap_FS_FOpenFile(filename, &f, FS_APPEND) < 0)
{
G_Error("Cmd_SetSniperSpot_f: cannot open %s for writing\n", filename);
}

Com_sprintf(buf, sizeof(buf), "{\n\"classname\" \"%s\"\n\"origin\" \"%.3f %.3f %.3f\"\n\"angles\" \"%.2f %.2f %.2f\"\n\"aiTeam\" \"%i\"\n}\n\n", spot->classname, spot->s.origin[0], spot->s.origin[1], spot->s.origin[2], spot->s.angles[0], spot->s.angles[1], spot->s.angles[2], spot->aiTeam);
trap_FS_Write(buf, strlen(buf), f);

trap_FS_FCloseFile(f);

G_Printf("dropped sniper spot\n");

return;
}

void G_PrintAccuracyLog(gentity_t *ent);

void Cmd_WeaponStat_f(gentity_t *ent)
Expand Down Expand Up @@ -3918,7 +3848,6 @@ void ClientCommand(int clientNum)
{
return;
}
// OSP

// ignore all other commands when at intermission
if (level.intermissiontime)
Expand Down Expand Up @@ -3961,9 +3890,7 @@ void ClientCommand(int clientNum)
}
else if (Q_stricmp(cmd, "where") == 0)
{
Cmd_Where_f(ent);
// } else if (Q_stricmp (cmd, "startCamera") == 0) {
// Cmd_StartCamera_f( ent );
Cmd_Where_f(ent);;
}
else if (Q_stricmp(cmd, "stopCamera") == 0)
{
Expand All @@ -3973,10 +3900,6 @@ void ClientCommand(int clientNum)
{
Cmd_SetCameraOrigin_f(ent);
}
else if (Q_stricmp(cmd, "cameraInterrupt") == 0) // FIXME: remove
{
// Cmd_InterruptCamera_f(ent);
}
else if (Q_stricmp(cmd, "setviewpos") == 0)
{
Cmd_SetViewpos_f(ent);
Expand All @@ -3985,11 +3908,6 @@ void ClientCommand(int clientNum)
{
Cmd_SetSpawnPoint_f(ent);
}
else if (Q_stricmp(cmd, "setsniperspot") == 0)
{
Cmd_SetSniperSpot_f(ent);

}
else if (G_commandCheck(ent, cmd, qfalse))
{
return;
Expand Down
6 changes: 2 additions & 4 deletions src/game/g_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@
#define MG42_MULTIPLAYER_HEALTH 350

// How long do bodies last?
// SP : Axis: 20 seconds
// Allies: 30 seconds
// MP : Both 10 seconds
#define BODY_TIME(t) ((g_gametype.integer != GT_SINGLE_PLAYER || g_gametype.integer == GT_COOP) ? 10000 : (t) == TEAM_AXIS ? 20000 : 30000)
// Both teams 10 seconds
#define BODY_TIME(t) 10000

#define MAX_MG42_HEAT 1500.f

Expand Down
Loading

0 comments on commit 74270f3

Please sign in to comment.