mirror of
https://github.com/id-Software/quake2-rerelease-dll.git
synced 2025-03-14 12:20:45 +00:00
More fixes
This commit is contained in:
parent
1d1ec76b6b
commit
74549c4982
5 changed files with 88 additions and 279 deletions
|
@ -602,39 +602,6 @@ void AssignSkin (edict_t * ent, const char *s, bool nickChanged)
|
|||
break;
|
||||
}
|
||||
}
|
||||
else if (esp->value)
|
||||
{
|
||||
/*
|
||||
In ATL mode (espsettings == 0), all teams must have a leader, and will have their own skin
|
||||
In ETV mode (espsettings == 1), only TEAM1 gets a leader.
|
||||
*/
|
||||
|
||||
switch (ent->client->resp.team)
|
||||
{
|
||||
case TEAM1:
|
||||
snprintf(skin, sizeof(skin), "%s\\%s", ent->client->pers.netname, teams[TEAM1].skin);
|
||||
if (IS_LEADER(ent)){
|
||||
snprintf(skin, sizeof(skin), "%s\\%s", ent->client->pers.netname, teams[TEAM1].leader_skin);
|
||||
}
|
||||
break;
|
||||
case TEAM2:
|
||||
snprintf(skin, sizeof(skin), "%s\\%s", ent->client->pers.netname, teams[TEAM2].skin);
|
||||
if ((espsettings.mode == 0) && IS_LEADER(ent)){
|
||||
snprintf(skin, sizeof(skin), "%s\\%s", ent->client->pers.netname, teams[TEAM2].leader_skin);
|
||||
}
|
||||
break;
|
||||
case TEAM3:
|
||||
snprintf(skin, sizeof(skin), "%s\\%s", ent->client->pers.netname, teams[TEAM3].skin);
|
||||
if ((espsettings.mode == 0) && IS_LEADER(ent)){
|
||||
snprintf(skin, sizeof(skin), "%s\\%s", ent->client->pers.netname, teams[TEAM3].leader_skin);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
snprintf(skin, sizeof(skin), "%s\\%s", ent->client->pers.netname, default_skin);
|
||||
break;
|
||||
}
|
||||
//gi.dprintf("I assigned skin %s to %s\n", skin, ent->client->pers.netname);
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (ent->client->resp.team)
|
||||
|
@ -708,13 +675,6 @@ void Team_f (edict_t * ent)
|
|||
|
||||
if (!teamplay->value)
|
||||
return;
|
||||
|
||||
//PG BUND - BEGIN (Tourney extension)
|
||||
if (use_tourney->value) {
|
||||
gi.cprintf(ent, PRINT_MEDIUM, "Currently running tourney mod, team selection is disabled.");
|
||||
return;
|
||||
}
|
||||
//PG BUND - END (Tourney extension)
|
||||
|
||||
Q_strncpyz(team, gi.args(), sizeof(team));
|
||||
t = team;
|
||||
|
@ -829,13 +789,6 @@ void JoinTeam (edict_t * ent, int desired_team, int skip_menuclose)
|
|||
if (level.intermission_framenum)
|
||||
return;
|
||||
|
||||
// Espionage join a game in progress
|
||||
if (esp->value && team_round_going && ent->inuse && ent->client->resp.team)
|
||||
{
|
||||
PutClientInServer (ent);
|
||||
//AddToTransparentList (ent);
|
||||
}
|
||||
|
||||
if (!(gameSettings & GS_ROUNDBASED) && team_round_going && ent->inuse && ent->client->resp.team)
|
||||
{
|
||||
PutClientInServer (ent);
|
||||
|
@ -863,8 +816,6 @@ void LeaveTeam (edict_t * ent)
|
|||
gi.LocBroadcast_Print (PRINT_HIGH, "%s left %s team.\n", ent->client->pers.netname, genderstr);
|
||||
|
||||
MM_LeftTeam( ent );
|
||||
EspLeaderLeftTeam ( ent );
|
||||
|
||||
ent->client->resp.joined_team = 0;
|
||||
ent->client->resp.team = NOTEAM;
|
||||
G_UpdatePlayerStatusbar(ent, 1);
|
||||
|
@ -1135,14 +1086,6 @@ void UpdateJoinMenu( void )
|
|||
|
||||
void OpenJoinMenu (edict_t * ent)
|
||||
{
|
||||
//PG BUND - BEGIN (Tourney extension)
|
||||
if (use_tourney->value)
|
||||
{
|
||||
OpenWeaponMenu (ent);
|
||||
return;
|
||||
}
|
||||
//PG BUND - END (Tourney extension)
|
||||
|
||||
UpdateJoinMenu();
|
||||
|
||||
PMenu_Open (ent, joinmenu, 11 /* magic for Auto-join menu item */, sizeof (joinmenu) / sizeof (pmenu_t));
|
||||
|
@ -1197,10 +1140,6 @@ void CleanLevel ()
|
|||
CleanBodies();
|
||||
// fix glass
|
||||
CGF_SFX_RebuildAllBrokenGlass ();
|
||||
|
||||
// Reset ETV capture point
|
||||
if (esp->value && espsettings.mode == ESPMODE_ETV)
|
||||
EspResetFlag();
|
||||
}
|
||||
|
||||
void MakeAllLivePlayersObservers(void);
|
||||
|
@ -1253,7 +1192,6 @@ void ResetScores (bool playerScores)
|
|||
ent->client->resp.streakKills = 0;
|
||||
ent->client->resp.ctf_caps = 0;
|
||||
ent->client->resp.ctf_capstreak = 0;
|
||||
ent->client->resp.esp_capstreak = 0;
|
||||
ent->client->resp.deaths = 0;
|
||||
ent->client->resp.team_kills = 0;
|
||||
ent->client->resp.team_wounds = 0;
|
||||
|
@ -1309,9 +1247,6 @@ bool BothTeamsHavePlayers()
|
|||
return false;
|
||||
//AQ2:TNG END
|
||||
|
||||
if (use_tourney->value)
|
||||
return (LastOpponent > 1);
|
||||
|
||||
if( ! _numclients() )
|
||||
return false;
|
||||
|
||||
|
@ -1341,44 +1276,9 @@ int CheckForWinner()
|
|||
int players[TEAM_TOP] = { 0 }, i = 0, teamNum = 0, teamsWithPlayers = 0;
|
||||
edict_t *ent;
|
||||
|
||||
if (!(gameSettings & GS_ROUNDBASED))
|
||||
if (!(gameSettings & GS_ROUNDBASED)) {
|
||||
return WINNER_NONE;
|
||||
|
||||
if (esp->value){
|
||||
if (espsettings.mode == ESPMODE_ATL) {
|
||||
if (teamCount == TEAM2) {
|
||||
if (teams[TEAM1].leader_dead && teams[TEAM2].leader_dead) {
|
||||
return WINNER_TIE;
|
||||
} else if (teams[TEAM1].leader_dead) {
|
||||
return TEAM2;
|
||||
} else if (teams[TEAM2].leader_dead) {
|
||||
return TEAM1;
|
||||
}
|
||||
} else if (teamCount == TEAM3) {
|
||||
if (teams[TEAM1].leader_dead && teams[TEAM2].leader_dead && teams[TEAM3].leader_dead) {
|
||||
return WINNER_TIE;
|
||||
} else if (teams[TEAM1].leader_dead && teams[TEAM2].leader_dead) {
|
||||
return TEAM3;
|
||||
} else if (teams[TEAM1].leader_dead && teams[TEAM3].leader_dead) {
|
||||
return TEAM2;
|
||||
} else if (teams[TEAM2].leader_dead && teams[TEAM3].leader_dead) {
|
||||
return TEAM1;
|
||||
}
|
||||
}
|
||||
} else if (espsettings.mode == ESPMODE_ETV) {
|
||||
// Check if this value is 1, which means the escorting team wins
|
||||
// By default it is 0
|
||||
if (espsettings.escortcap == 1) {
|
||||
gi.Com_PrintFmt("The winner was team %d\n", TEAM1);
|
||||
return TEAM1;
|
||||
} else if (teams[TEAM1].leader_dead){
|
||||
gi.Com_PrintFmt("The winner was team %d\n", TEAM2);
|
||||
return TEAM2;
|
||||
}
|
||||
}
|
||||
//gi.dprintf("Escortcap value is %d\n", espsettings.escortcap);
|
||||
|
||||
} else if (!esp->value) {
|
||||
} else {
|
||||
for (i = 0; i < game.maxclients; i++){
|
||||
ent = &g_edicts[1 + i];
|
||||
if (!ent->inuse || ent->solid == SOLID_NOT)
|
||||
|
@ -1461,12 +1361,8 @@ static void SpawnPlayers(void)
|
|||
int i;
|
||||
edict_t *ent;
|
||||
|
||||
if (gameSettings & GS_ROUNDBASED)
|
||||
{
|
||||
if (!use_oldspawns->value)
|
||||
NS_SetupTeamSpawnPoints ();
|
||||
else
|
||||
SetupTeamSpawnPoints ();
|
||||
if (gameSettings & GS_ROUNDBASED) {
|
||||
NS_SetupTeamSpawnPoints ();
|
||||
}
|
||||
|
||||
InitTransparentList();
|
||||
|
@ -1488,8 +1384,7 @@ static void SpawnPlayers(void)
|
|||
// } else if (WPF_ALLOWED(IT_WEAPON_KNIFE)) {
|
||||
// ent->client->pers.chosenWeapon = GetItemByIndex(IT_WEAPON_KNIFE);
|
||||
// } else {
|
||||
ent->client->pers.chosenWeapon = GetItemByIndex(IT_WEAPON_MK23);
|
||||
}
|
||||
ent->client->pers.chosenWeapon = GetItemByIndex(IT_WEAPON_MK23);
|
||||
}
|
||||
|
||||
if (!ent->client->pers.chosenItem) {
|
||||
|
@ -1541,10 +1436,9 @@ void RunWarmup ()
|
|||
if (!ent->client->pers.chosenWeapon || !ent->client->pers.chosenItem)
|
||||
continue;
|
||||
|
||||
dead = (ent->solid == SOLID_NOT && ent->deadflag == DEAD_NO && ent->movetype == MOVETYPE_NOCLIP);
|
||||
if (dead && ent->client->latched_buttons & BUTTON_ATTACK)
|
||||
if ((!IS_ALIVE(ent) && ent->movetype == MOVETYPE_NOCLIP) && ent->client->latched_buttons & BUTTON_ATTACK)
|
||||
{
|
||||
ent->client->latched_buttons = 0;
|
||||
ent->client->latched_buttons = BUTTON_NONE;
|
||||
PutClientInServer(ent);
|
||||
AddToTransparentList(ent);
|
||||
gi.LocCenter_Print(ent, "WARMUP");
|
||||
|
@ -1563,17 +1457,11 @@ static void StartLCA(void)
|
|||
if ((gameSettings & (GS_WEAPONCHOOSE|GS_ROUNDBASED)))
|
||||
CleanLevel();
|
||||
|
||||
if (use_tourney->value && !tourney_lca->value)
|
||||
{
|
||||
lights_camera_action = TourneySetTime (T_SPAWN);
|
||||
TourneyTimeEvent(T_SPAWN, lights_camera_action);
|
||||
}
|
||||
else
|
||||
{
|
||||
CenterPrintAll ("LIGHTS...");
|
||||
gi.sound(&g_edicts[0], CHAN_VOICE | CHAN_NO_PHS_ADD, level.snd_lights, 1.0, ATTN_NONE, 0.0);
|
||||
lights_camera_action = 43; // TempFile changed from 41
|
||||
}
|
||||
|
||||
CenterPrintAll ("LIGHTS...");
|
||||
gi.sound(&g_edicts[0], CHAN_VOICE | CHAN_NO_PHS_ADD, snd_lights, 1.0, ATTN_NONE, 0.0);
|
||||
lights_camera_action = 43; // TempFile changed from 41
|
||||
|
||||
SpawnPlayers();
|
||||
}
|
||||
|
||||
|
@ -1604,30 +1492,19 @@ edict_t *FindOverlap (edict_t * ent, edict_t * last_overlap)
|
|||
|
||||
void ContinueLCA ()
|
||||
{
|
||||
if (use_tourney->value && !tourney_lca->value)
|
||||
if (lights_camera_action == 23)
|
||||
{
|
||||
TourneyTimeEvent (T_SPAWN, lights_camera_action);
|
||||
if (lights_camera_action == 1)
|
||||
{
|
||||
StartRound();
|
||||
}
|
||||
CenterPrintAll("CAMERA...");
|
||||
gi.sound(&g_edicts[0], CHAN_VOICE | CHAN_NO_PHS_ADD, level.snd_camera , 1.0, ATTN_NONE, 0.0);
|
||||
}
|
||||
else
|
||||
else if (lights_camera_action == 3)
|
||||
{
|
||||
if (lights_camera_action == 23)
|
||||
{
|
||||
CenterPrintAll("CAMERA...");
|
||||
gi.sound(&g_edicts[0], CHAN_VOICE | CHAN_NO_PHS_ADD, level.snd_camera , 1.0, ATTN_NONE, 0.0);
|
||||
}
|
||||
else if (lights_camera_action == 3)
|
||||
{
|
||||
CenterPrintAll("ACTION!");
|
||||
gi.sound(&g_edicts[0], CHAN_VOICE | CHAN_NO_PHS_ADD, level.snd_action, 1.0, ATTN_NONE, 0.0);
|
||||
}
|
||||
else if (lights_camera_action == 1)
|
||||
{
|
||||
StartRound();
|
||||
}
|
||||
CenterPrintAll("ACTION!");
|
||||
gi.sound(&g_edicts[0], CHAN_VOICE | CHAN_NO_PHS_ADD, level.snd_action, 1.0, ATTN_NONE, 0.0);
|
||||
}
|
||||
else if (lights_camera_action == 1)
|
||||
{
|
||||
StartRound();
|
||||
}
|
||||
lights_camera_action--;
|
||||
}
|
||||
|
@ -1827,42 +1704,17 @@ int WonGame (int winner)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (use_tourney->value)
|
||||
{
|
||||
if(winner == TEAM1)
|
||||
player = TourneyFindPlayer(1);
|
||||
else
|
||||
player = TourneyFindPlayer(NextOpponent);
|
||||
gi.LocBroadcast_Print (PRINT_HIGH, "%s won!\n", TeamName(winner));
|
||||
// AQ:TNG Igor[Rock] changing sound dir
|
||||
if(use_warnings->value)
|
||||
gi.sound(&g_edicts[0], CHAN_VOICE | CHAN_NO_PHS_ADD, level.snd_teamwins[winner], 1.0, ATTN_NONE, 0.0);
|
||||
// end of changing sound dir
|
||||
teams[winner].score++;
|
||||
|
||||
if (player)
|
||||
{
|
||||
gi.LocBroadcast_Print (PRINT_HIGH, "%s was victorious!\n",
|
||||
player->client->pers.netname);
|
||||
player->client->pers.netname);
|
||||
TourneyWinner (player);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gi.LocBroadcast_Print (PRINT_HIGH, "%s won!\n", TeamName(winner));
|
||||
// AQ:TNG Igor[Rock] changing sound dir
|
||||
if(use_warnings->value)
|
||||
gi.sound(&g_edicts[0], CHAN_VOICE | CHAN_NO_PHS_ADD, level.snd_teamwins[winner], 1.0, ATTN_NONE, 0.0);
|
||||
// end of changing sound dir
|
||||
teams[winner].score++;
|
||||
if (esp->value) {
|
||||
for (i = 0; i <= teamCount; i++) {
|
||||
// Reset leader_dead for all teams before next round starts and set escortcap to 0
|
||||
gi.Com_PrintFmt("Resetting team %d leader status to false\n", i);
|
||||
espsettings.escortcap = 0;
|
||||
teams[i].leader_dead = false;
|
||||
}
|
||||
}
|
||||
gi.cvar_forceset(teams[winner].teamscore->name, va("%i", teams[winner].score));
|
||||
|
||||
gi.cvar_forceset(teams[winner].teamscore->name, va("%i", teams[winner].score));
|
||||
PrintScores ();
|
||||
|
||||
PrintScores ();
|
||||
}
|
||||
}
|
||||
|
||||
if (CheckTimelimit())
|
||||
|
@ -1914,19 +1766,6 @@ int CheckTeamRules (void)
|
|||
char ltm[64] = "";
|
||||
char mvdstring[512] = "";
|
||||
|
||||
if (round_delay_time && use_tourney->value)
|
||||
{
|
||||
TourneyTimeEvent (T_END, round_delay_time);
|
||||
round_delay_time--;
|
||||
if (!round_delay_time)
|
||||
{
|
||||
TourneyNewRound ();
|
||||
team_round_countdown = TourneySetTime( T_RSTART );
|
||||
TourneyTimeEvent (T_START, team_round_countdown);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (lights_camera_action)
|
||||
{
|
||||
ContinueLCA ();
|
||||
|
@ -1956,18 +1795,10 @@ int CheckTeamRules (void)
|
|||
team_game_going = 1;
|
||||
StartLCA();
|
||||
}
|
||||
else if (esp->value && AllTeamsHaveLeaders())
|
||||
{
|
||||
in_warmup = 0;
|
||||
team_game_going = 1;
|
||||
StartLCA();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!matchmode->value || TeamsReady())
|
||||
CenterPrintAll ("Not enough players to play!");
|
||||
else if (esp->value && !AllTeamsHaveLeaders())
|
||||
CenterPrintAll ("Both Teams Must Have a Leader!");
|
||||
else
|
||||
CenterPrintAll ("Both Teams Must Be Ready!");
|
||||
|
||||
|
@ -1975,10 +1806,6 @@ int CheckTeamRules (void)
|
|||
MakeAllLivePlayersObservers ();
|
||||
}
|
||||
}
|
||||
else if(use_tourney->value)
|
||||
{
|
||||
TourneyTimeEvent (T_START, team_round_countdown);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (team_round_countdown == 101)
|
||||
|
@ -2026,13 +1853,6 @@ int CheckTeamRules (void)
|
|||
if (CheckTimelimit())
|
||||
return 1;
|
||||
|
||||
if (esp->value && EspCheckRules())
|
||||
{
|
||||
EndDMLevel();
|
||||
team_round_going = team_round_countdown = team_game_going = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (vCheckVote()) {
|
||||
EndDMLevel ();
|
||||
team_round_going = team_round_countdown = team_game_going = 0;
|
||||
|
@ -2041,38 +1861,25 @@ int CheckTeamRules (void)
|
|||
|
||||
if (!team_round_countdown)
|
||||
{
|
||||
if (BothTeamsHavePlayers() || (esp->value && AllTeamsHaveLeaders()))
|
||||
if (BothTeamsHavePlayers())
|
||||
{
|
||||
if (use_tourney->value)
|
||||
{
|
||||
TourneyNewRound ();
|
||||
team_round_countdown = TourneySetTime( T_START );
|
||||
TourneyTimeEvent (T_START, team_round_countdown);
|
||||
}
|
||||
else
|
||||
{
|
||||
int warmup_length = max( warmup->value, round_begin->value );
|
||||
char buf[64] = "";
|
||||
if (esp->value) {
|
||||
sprintf( buf, "All teams have leaders!\nThe round will begin in %d seconds!", warmup_length );
|
||||
} else {
|
||||
sprintf( buf, "The round will begin in %d seconds!", warmup_length );
|
||||
}
|
||||
CenterPrintAll( buf );
|
||||
team_round_countdown = warmup_length * 10 + 2;
|
||||
int warmup_length = max( warmup->value, round_begin->value );
|
||||
char buf[64] = "";
|
||||
sprintf( buf, "The round will begin in %d seconds!", warmup_length );
|
||||
CenterPrintAll( buf );
|
||||
team_round_countdown = warmup_length * 10 + 2;
|
||||
|
||||
// JBravo: Autostart q2pro MVD2 recording on the server
|
||||
if( use_mvd2->value )
|
||||
{
|
||||
tnow = time(NULL);
|
||||
now = localtime(&tnow);
|
||||
strftime( ltm, 64, "%Y%m%d-%H%M%S", now );
|
||||
snprintf( mvdstring, sizeof(mvdstring), "mvdrecord %s-%s\n", ltm, level.mapname );
|
||||
gi.AddCommandString( mvdstring );
|
||||
gi.LocBroadcast_Print( PRINT_HIGH, "Starting MVD recording to file %s-%s.mvd2\n", ltm, level.mapname );
|
||||
}
|
||||
// JBravo: End MVD2
|
||||
// JBravo: Autostart q2pro MVD2 recording on the server
|
||||
if( use_mvd2->value )
|
||||
{
|
||||
tnow = time(NULL);
|
||||
now = localtime(&tnow);
|
||||
strftime( ltm, 64, "%Y%m%d-%H%M%S", now );
|
||||
snprintf( mvdstring, sizeof(mvdstring), "mvdrecord %s-%s\n", ltm, level.mapname );
|
||||
gi.AddCommandString( mvdstring );
|
||||
gi.LocBroadcast_Print( PRINT_HIGH, "Starting MVD recording to file %s-%s.mvd2\n", ltm, level.mapname );
|
||||
}
|
||||
// JBravo: End MVD2
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2120,14 +1927,6 @@ int CheckTeamRules (void)
|
|||
}
|
||||
return 0; //CTF and teamDM dont need to check winner, its not round based
|
||||
}
|
||||
else if ((gameSettings & GS_ROUNDBASED))
|
||||
// Team round is going, and it's GS_ROUNDBASED
|
||||
{
|
||||
if (esp->value) {
|
||||
GenerateMedKit(false);
|
||||
// Do something here about giving players stuff
|
||||
}
|
||||
}
|
||||
|
||||
winner = CheckForWinner();
|
||||
if (winner != WINNER_NONE)
|
||||
|
@ -2144,11 +1943,7 @@ int CheckTeamRules (void)
|
|||
lights_camera_action = 0;
|
||||
holding_on_tie_check = 0;
|
||||
timewarning = fragwarning = 0;
|
||||
|
||||
if (use_tourney->value)
|
||||
round_delay_time = TourneySetTime (T_END);
|
||||
else
|
||||
team_round_countdown = 71;
|
||||
team_round_countdown = 71;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1171,8 +1171,19 @@ struct level_locals_t
|
|||
gtime_t next_match_report;
|
||||
|
||||
// Action add
|
||||
int32_t snd_silencer;
|
||||
int32_t snd_headshot;
|
||||
int32_t snd_vesthit;
|
||||
int32_t snd_knifethrow;
|
||||
int32_t snd_kick;
|
||||
int32_t snd_noammo;
|
||||
int32_t snd_lights;
|
||||
int32_t snd_camera;
|
||||
int32_t snd_action;
|
||||
int32_t snd_teamwins[TEAM_TOP];
|
||||
int32_t model_null;
|
||||
int32_t model_lsight;
|
||||
float matchTime;
|
||||
};
|
||||
|
||||
struct shadow_light_temp_t
|
||||
|
@ -1623,6 +1634,7 @@ extern int snd_fry;
|
|||
// Action Add
|
||||
extern cvar_t *teamdm;
|
||||
extern cvar_t *teamdm_respawn;
|
||||
extern cvar_t *matchmode;
|
||||
extern cvar_t *ff_afterround;
|
||||
extern cvar_t *respawn_effect;
|
||||
extern cvar_t *use_warnings;
|
||||
|
@ -1651,13 +1663,8 @@ extern cvar_t *auto_menu; // Automatically show the join menu
|
|||
extern cvar_t *dm_choose;
|
||||
extern cvar_t *dm_shield;
|
||||
extern cvar_t *uvtime;
|
||||
extern cvar_t *warmup;
|
||||
|
||||
extern int snd_silencer;
|
||||
extern int snd_headshot;
|
||||
extern int snd_vesthit;
|
||||
extern int snd_knifethrow;
|
||||
extern int snd_kick;
|
||||
extern int snd_noammo;
|
||||
extern mod_id_t meansOfDeath;
|
||||
|
||||
// zucc for hitlocation of death
|
||||
|
@ -2898,11 +2905,11 @@ struct client_respawn_t
|
|||
int32_t team_wounds;
|
||||
|
||||
int32_t team;
|
||||
int32_t subteam;
|
||||
int32_t sniper_mode;
|
||||
|
||||
int32_t idletime;
|
||||
int32_t totalidletime;
|
||||
int32_t tourneynumber;
|
||||
edict_t *kickvote;
|
||||
|
||||
char *mapvote; // pointer to map voted on (if any)
|
||||
|
@ -3174,6 +3181,9 @@ struct gclient_t
|
|||
int32_t unique_weapon_total;
|
||||
|
||||
int32_t inventory[MAX_ITEMS];
|
||||
|
||||
edict_t *chase_target;
|
||||
int32_t chase_mode;
|
||||
// ammo capacities
|
||||
int32_t ammo_index;
|
||||
int32_t max_pistolmags;
|
||||
|
|
|
@ -28,12 +28,6 @@ int snd_fry;
|
|||
// Action Add
|
||||
int locOfDeath;
|
||||
int stopAP;
|
||||
int snd_silencer;
|
||||
int snd_headshot;
|
||||
int snd_vesthit;
|
||||
int snd_knifethrow;
|
||||
int snd_kick;
|
||||
int snd_noammo;
|
||||
|
||||
// Action Add end
|
||||
|
||||
|
@ -162,6 +156,8 @@ cvar_t *roundlimit;
|
|||
cvar_t *dm_choose;
|
||||
cvar_t *dm_shield;
|
||||
cvar_t *uvtime;
|
||||
cvar_t *matchmode;
|
||||
cvar_t *warmup;
|
||||
|
||||
// Kick / Bans / Silences
|
||||
cvar_t *maxteamkills;
|
||||
|
|
|
@ -1546,12 +1546,20 @@ void SP_worldspawn(edict_t *ent)
|
|||
|
||||
snd_fry = gi.soundindex("player/fry.wav"); // standing in lava / slime
|
||||
// Action Add
|
||||
snd_silencer = gi.soundindex("misc/silencer.wav"); // all silencer weapons
|
||||
snd_headshot = gi.soundindex("misc/headshot.wav"); // headshot sound
|
||||
snd_vesthit = gi.soundindex("misc/vest.wav"); // kevlar hit
|
||||
snd_knifethrow = gi.soundindex("misc/flyloop.wav"); // throwing knife
|
||||
snd_kick = gi.soundindex("weapons/kick.wav"); // not loaded by any item, kick sound
|
||||
snd_noammo = gi.soundindex("weapons/noammo.wav");
|
||||
level.snd_silencer = gi.soundindex("misc/silencer.wav"); // all silencer weapons
|
||||
level.snd_headshot = gi.soundindex("misc/headshot.wav"); // headshot sound
|
||||
level.snd_vesthit = gi.soundindex("misc/vest.wav"); // kevlar hit
|
||||
level.snd_knifethrow = gi.soundindex("misc/flyloop.wav"); // throwing knife
|
||||
level.snd_kick = gi.soundindex("weapons/kick.wav"); // not loaded by any item, kick sound
|
||||
level.snd_noammo = gi.soundindex("weapons/noammo.wav");
|
||||
|
||||
level.snd_lights = gi.soundindex("atl/lights.wav");
|
||||
level.snd_camera = gi.soundindex("atl/camera.wav");
|
||||
level.snd_action = gi.soundindex("atl/action.wav");
|
||||
level.snd_teamwins[0] = gi.soundindex("tng/no_team_wins.wav");
|
||||
level.snd_teamwins[1] = gi.soundindex("tng/team1_wins.wav");
|
||||
level.snd_teamwins[2] = gi.soundindex("tng/team2_wins.wav");
|
||||
level.snd_teamwins[3] = gi.soundindex("tng/team3_wins.wav");
|
||||
|
||||
PrecacheItem(GetItemByIndex(IT_WEAPON_MK23));
|
||||
|
||||
|
|
|
@ -1995,7 +1995,7 @@ void PlayWeaponSound(edict_t* ent)
|
|||
|
||||
if (ent->client->weapon_sound & MZ_SILENCED)
|
||||
// Silencer suppresses both sound and muzzle flash.
|
||||
gi.sound(ent, CHAN_WEAPON, snd_silencer, 1, ATTN_NORM, 0);
|
||||
gi.sound(ent, CHAN_WEAPON, level.snd_silencer, 1, ATTN_NORM, 0);
|
||||
|
||||
else switch (ent->client->weapon_sound)
|
||||
{
|
||||
|
@ -2073,7 +2073,7 @@ void Pistol_Fire(edict_t* ent)
|
|||
// gi.sound(ent, CHAN_VOICE, level.snd_noammo, 1, ATTN_NORM, 0);
|
||||
// ent->pain_debounce_framenum = level.time + 10_ms;
|
||||
// }
|
||||
gi.sound(ent, CHAN_VOICE, snd_noammo, 1, ATTN_NORM, 0);
|
||||
gi.sound(ent, CHAN_VOICE, level.snd_noammo, 1, ATTN_NORM, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2188,7 +2188,7 @@ void MP5_Fire(edict_t* ent)
|
|||
// gi.sound(ent, CHAN_VOICE, level.snd_noammo, 1, ATTN_NORM, 0);
|
||||
// ent->pain_debounce_framenum = level.framenum + 1 * HZ;
|
||||
// }
|
||||
gi.sound(ent, CHAN_VOICE, snd_noammo, 1, ATTN_NORM, 0);
|
||||
gi.sound(ent, CHAN_VOICE, level.snd_noammo, 1, ATTN_NORM, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2518,7 +2518,7 @@ void M4_Fire(edict_t* ent)
|
|||
// gi.sound(ent, CHAN_VOICE, level.snd_noammo, 1, ATTN_NORM, 0);
|
||||
// ent->pain_debounce_framenum = level.framenum + 1 * HZ;
|
||||
// }
|
||||
gi.sound(ent, CHAN_VOICE, snd_noammo, 1, ATTN_NORM, 0);
|
||||
gi.sound(ent, CHAN_VOICE, level.snd_noammo, 1, ATTN_NORM, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2839,7 +2839,7 @@ void Sniper_Fire(edict_t* ent)
|
|||
|
||||
// ent->pain_debounce_framenum = level.framenum + 1 * HZ;
|
||||
// }
|
||||
gi.sound(ent, CHAN_VOICE, snd_noammo, 1, ATTN_NORM, 0);
|
||||
gi.sound(ent, CHAN_VOICE, level.snd_noammo, 1, ATTN_NORM, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2929,7 +2929,7 @@ void Dual_Fire(edict_t* ent)
|
|||
|
||||
// ent->pain_debounce_framenum = level.framenum + 1 * HZ;
|
||||
// }
|
||||
gi.sound(ent, CHAN_VOICE, snd_noammo, 1, ATTN_NORM, 0);
|
||||
gi.sound(ent, CHAN_VOICE, level.snd_noammo, 1, ATTN_NORM, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2985,7 +2985,7 @@ void Dual_Fire(edict_t* ent)
|
|||
{
|
||||
ent->client->dual_rds = 0;
|
||||
ent->client->mk23_rds = 0;
|
||||
gi.sound(ent, CHAN_WEAPON, snd_noammo, 1, ATTN_NORM, 0);
|
||||
gi.sound(ent, CHAN_WEAPON, level.snd_noammo, 1, ATTN_NORM, 0);
|
||||
//ent->pain_debounce_time = level.time + 1;
|
||||
ent->client->ps.gunframe = 68;
|
||||
ent->client->weaponstate = WEAPON_END_MAG;
|
||||
|
@ -3017,7 +3017,7 @@ void Dual_Fire(edict_t* ent)
|
|||
// gi.sound(ent, CHAN_VOICE, level.snd_noammo, 1, ATTN_NORM, 0);
|
||||
// ent->pain_debounce_framenum = level.framenum + 1 * HZ;
|
||||
// }
|
||||
gi.sound(ent, CHAN_VOICE, snd_noammo, 1, ATTN_NORM, 0);
|
||||
gi.sound(ent, CHAN_VOICE, level.snd_noammo, 1, ATTN_NORM, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue