set g_spawnshieldtime 1 "number of seconds you are invincible after you spawned, this shield is lost after you fire"
set g_antilag 2 "AntiLag (0 = no AntiLag, 1 = verified client side hit scan, 2 = server side hit scan in the past, 3 = unverified client side hit scan)"
set g_antilag_nudge 0 "don't touch"
-set g_antilag_bullets 1 "Bullets AntiLag (0 = no AntiLag, 1 = server side hit scan in the past) - DO NOT TOUCH (severely changes weapon balance)"
set g_shootfromclient 2 "let client decide if it has the gun left or right; if set to 2, center handedness is allowed; see also cl_gunalign"
set g_shootfromeye 0 "shots are fired from your eye/crosshair; visual gun position can still be influenced by cl_gunalign 1 and 2"
set g_shootfromcenter 0 "weapon gets moved to the center, shots still come from the barrel of your weapon; visual gun position can still be influenced by cl_gunalign 1 and 2"
set g_spawn_useallspawns 0 "use all spawns, e.g. also team spawns in non-teamplay, and all spawns, even enemy spawns, in teamplay"
// respawn delay
set g_respawn_delay 2 "number of seconds you have to wait before you can respawn again"
+ set g_respawn_delay_max 0 "number of seconds you can wait before you're forced to respawn (only effective with g_forced_respawn 1)"
set g_respawn_waves 0 "respawn in waves (every n seconds), intended to decrease overwhelming base attacks"
// overtime
r_cullentities_trace 0
// less "lagging" of other players, but also less PL tolerant... let's try this
-sv_clmovement_inputtimeout 0.07 // more than 2, less than 3 server frames
+sv_clmovement_inputtimeout 0.066 // slightly less than 2 frames, so only one frame can be compensated
// exact gloss looks better, e.g. on g-23
r_shadow_glossexact 1
MUTATOR_CALLHOOK(MakePlayerObserver);
Portal_ClearAll(self);
-
+
if(self.alivetime)
{
if(!warmup_stage)
}
if(self.vehicle)
- vehicles_exit(VHEF_RELESE);
+ vehicles_exit(VHEF_RELESE);
WaypointSprite_PlayerDead();
- if not(g_ca) // don't reset teams when moving a ca player to the spectators
+ if (!g_ca) // don't reset teams when moving a ca player to the spectators
self.team = -1; // move this as it is needed to log the player spectating in eventlog
if(self.killcount != -666)
accuracy_resend(self);
self.spectatortime = time;
-
+
self.classname = "observer";
self.iscreature = FALSE;
self.teleportable = TELEPORT_SIMPLE;
//stuffcmd(self, "chase_active 0");
//stuffcmd(self, "set viewsize $tmpviewsize \n");
-
+
target_voicescript_clear(self);
// reset fields the weapons may use
if(!self.killindicator_teamchange)
{
self.vehicle_health = -1;
- Damage(self, self, self, 1 , DEATH_KILL, self.origin, '0 0 0');
+ Damage(self, self, self, 1 , DEATH_KILL, self.origin, '0 0 0');
}
}
if(gameover) return;
if(self.player_blocked) return;
if(self.freezetag_frozen) return;
-
+
ClientKill_TeamChange(0);
}
string s;
// NOTE: we do NOT check crypto_keyfp here, an unsigned ID is fine too for this
- if not(p.crypto_idfp)
+ if (!p.crypto_idfp)
return 0;
// this function allows abbreviated player IDs too!
if(self.vehicle)
vehicles_exit(VHEF_RELESE);
- if not(IS_CLIENT(self))
+ if (!IS_CLIENT(self))
{
print("Warning: ClientDisconnect without ClientConnect\n");
return;
if(autocvar_sv_eventlog)
GameLogEcho(strcat(":part:", ftos(self.playerid)));
-
+
Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_QUIT_DISCONNECT, self.netname);
MUTATOR_CALLHOOK(ClientDisconnect);
Fire_ApplyDamage(self);
Fire_ApplyEffect(self);
- if not(g_minstagib)
+ if (!g_minstagib)
{
if (self.items & IT_STRENGTH)
{
self.superweapons_finished = 0;
}
}
-
+
if(autocvar_g_nodepthtestplayers)
self.effects = self.effects | EF_NODEPTHTEST;
self.event_damage(self, self, 1, DEATH_ROT, self.origin, '0 0 0');
}
- if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+ if (!(self.items & IT_UNLIMITED_WEAPON_AMMO))
self.ammo_fuel = CalcRotRegen(self.ammo_fuel, minf, autocvar_g_balance_fuel_regen, autocvar_g_balance_fuel_regenlinear, regen_mod * frametime * (time > self.pauseregen_finished) * ((self.items & IT_FUEL_REGEN) != 0), maxf, autocvar_g_balance_fuel_rot, autocvar_g_balance_fuel_rotlinear, rot_mod * frametime * (time > self.pauserotfuel_finished), limitf);
}
setorigin(self, spectatee.origin);
setsize(self, spectatee.mins, spectatee.maxs);
SetZoomState(spectatee.zoomstate);
-
+
anticheat_spectatecopy(spectatee);
self.hud = spectatee.hud;
if(spectatee.vehicle)
self.vehicle_reload2 = spectatee.vehicle_reload2;
msg_entity = self;
-
+
WriteByte (MSG_ONE, SVC_SETVIEWANGLES);
WriteAngle(MSG_ONE, spectatee.v_angle_x);
WriteAngle(MSG_ONE, spectatee.v_angle_y);
WriteAngle(MSG_ONE, spectatee.v_angle_z);
//WriteByte (MSG_ONE, SVC_SETVIEW);
- // WriteEntity(MSG_ONE, self);
+ // WriteEntity(MSG_ONE, self);
//makevectors(spectatee.v_angle);
- //setorigin(self, spectatee.origin - v_forward * 400 + v_up * 300);*/
+ //setorigin(self, spectatee.origin - v_forward * 400 + v_up * 300);*/
}
}
float SpectateUpdate() {
if(!self.enemy)
- return 0;
+ return 0;
if (self == self.enemy)
return 0;
- if not(IS_PLAYER(self.enemy))
+ if (!IS_PLAYER(self.enemy))
return 0;
SpectateCopy(self.enemy);
if (start.team == self.team) {
return start;
}
-
+
other = start;
// continue from current player
while(other && other.team != self.team) {
other = find(other, classname, "player");
}
-
+
if (!other) {
// restart from begining
other = find(other, classname, "player");
other = find(other, classname, "player");
}
}
-
+
return other;
}
{
// NOTE: chain order is from the highest to the lower entnum (unlike find)
other = findchain(classname, "player");
- if not(other) // no player
+ if (!other) // no player
return FALSE;
entity first = other;
do { other = other.chain; }
while(other && other.team != self.team);
- if not(other)
+ if (!other)
{
other = first;
while(other.team != self.team)
void PlayerUseKey()
{
- if not(IS_PLAYER(self))
+ if (!IS_PLAYER(self))
return;
if(self.vehicle)
vehicles_exit(VHEF_NORMAL);
return;
}
-
+
// a use key was pressed; call handlers
MUTATOR_CALLHOOK(PlayerUseKey);
}
if(frametime)
player_anim();
button_pressed = (self.BUTTON_ATCK || self.BUTTON_JUMP || self.BUTTON_ATCK2 || self.BUTTON_HOOK || self.BUTTON_USE);
-
+
if (self.deadflag == DEAD_DYING)
{
- if(self.respawn_flags & RESPAWN_FORCE)
+ if((self.respawn_flags & RESPAWN_FORCE) && !autocvar_g_respawn_delay_max)
self.deadflag = DEAD_RESPAWNING;
else if(!button_pressed)
self.deadflag = DEAD_DEAD;
{
if(button_pressed)
self.deadflag = DEAD_RESPAWNABLE;
+ else if(time >= self.respawn_time_max && (self.respawn_flags & RESPAWN_FORCE))
+ self.deadflag = DEAD_RESPAWNING;
}
else if (self.deadflag == DEAD_RESPAWNABLE)
{
if(time > self.respawn_time)
{
self.respawn_time = time + 1; // only retry once a second
+ self.respawn_time_max = self.respawn_time;
respawn();
}
}
if(self.respawn_flags & RESPAWN_SILENT)
self.stat_respawn_time = 0;
+ else if((self.respawn_flags & RESPAWN_FORCE) && autocvar_g_respawn_delay_max)
+ self.stat_respawn_time = self.respawn_time_max;
else
self.stat_respawn_time = self.respawn_time;
}
if(frametime)
player_anim();
-
+
// secret status
secrets_setstatus();
-
+
self.dmg_team = max(0, self.dmg_team - autocvar_g_teamdamage_resetspeed * frametime);
//self.angles_y=self.v_angle_y + 90; // temp
return; // intermission or finale
GetPressedKeys();
}
-
+
#ifdef TETRIS
}
#endif
if((g_cts || g_race) && self.cvar_cl_allow_uidtracking == 1 && self.cvar_cl_allow_uid2name == 1)
{
- if not(self.stored_netname)
+ if (!self.stored_netname)
self.stored_netname = strzone(uid2name(self.crypto_idfp));
if(self.stored_netname != self.netname)
{
self.respawn_time = ceil((time + sdelay) / waves) * waves;
else
self.respawn_time = time + sdelay;
+ if(autocvar_g_respawn_delay_max > sdelay)
+ self.respawn_time_max = time + autocvar_g_respawn_delay_max;
+ else
+ self.respawn_time_max = self.respawn_time;
if((sdelay + waves >= 5.0) && (self.respawn_time - time > 1.75))
self.respawn_countdown = 10; // first number to count down from is 10
else
msgin = formatmessage(msgin);
- if not(IS_PLAYER(source))
+ if (!IS_PLAYER(source))
colorstr = "^0"; // black for spectators
else if(teamplay)
colorstr = Team_ColorCode(source.team);
}
if(!privatesay)
- if not(IS_PLAYER(source))
+ if (!IS_PLAYER(source))
{
- if not(intermission_running)
+ if (!intermission_running)
if(teamsay || (autocvar_g_chat_nospectators == 1) || (autocvar_g_chat_nospectators == 2 && !(warmup_stage || gameover)))
teamsay = -1; // spectators
}
{
sprint(source, sourcemsgstr);
sprint(privatesay, msgstr);
- if not(autocvar_g_chat_tellprivacy) { dedicated_print(msgstr); } // send to server console too if "tellprivacy" is disabled
+ if (!autocvar_g_chat_tellprivacy) { dedicated_print(msgstr); } // send to server console too if "tellprivacy" is disabled
if(cmsgstr != "")
centerprint(privatesay, cmsgstr);
}
{
sprint(source, sourcemsgstr);
dedicated_print(msgstr); // send to server console too
- FOR_EACH_REALCLIENT(head) if not(IS_PLAYER(head))
+ FOR_EACH_REALCLIENT(head) if (!IS_PLAYER(head))
if(head != source)
sprint(head, msgstr);
}
}
fclose(fh);
- if not(allvoicesamples)
+ if (!allvoicesamples)
{
#define _VOICEMSG(m) allvoicesamples = strcat(allvoicesamples, " ", #m);
ALLVOICEMSGS