self.nextthink = 0;
self.hook_time = 0;
self.dmg_team = 0;
+ self.ballistics_density = cvar("g_ballistics_density_player");
self.metertime = 0;
{
WriteByte(MSG_ENTITY, ENT_CLIENT_INIT);
WriteByte(MSG_ENTITY, g_nexball_meter_period * 32);
- WriteCoord(MSG_ENTITY, hook_shotorigin_x);
- WriteCoord(MSG_ENTITY, hook_shotorigin_y);
- WriteCoord(MSG_ENTITY, hook_shotorigin_z);
+ WriteInt24_t(MSG_ENTITY, compressShotOrigin(hook_shotorigin[0]));
+ WriteInt24_t(MSG_ENTITY, compressShotOrigin(hook_shotorigin[1]));
+ WriteInt24_t(MSG_ENTITY, compressShotOrigin(hook_shotorigin[2]));
+ WriteInt24_t(MSG_ENTITY, compressShotOrigin(hook_shotorigin[3]));
+ WriteInt24_t(MSG_ENTITY, compressShotOrigin(electro_shotorigin[0]));
+ WriteInt24_t(MSG_ENTITY, compressShotOrigin(electro_shotorigin[1]));
+ WriteInt24_t(MSG_ENTITY, compressShotOrigin(electro_shotorigin[2]));
+ WriteInt24_t(MSG_ENTITY, compressShotOrigin(electro_shotorigin[3]));
+ WriteInt24_t(MSG_ENTITY, compressShotOrigin(gauntlet_shotorigin[0]));
+ WriteInt24_t(MSG_ENTITY, compressShotOrigin(gauntlet_shotorigin[1]));
+ WriteInt24_t(MSG_ENTITY, compressShotOrigin(gauntlet_shotorigin[2]));
+ WriteInt24_t(MSG_ENTITY, compressShotOrigin(gauntlet_shotorigin[3]));
if(sv_foginterval && world.fog != "")
WriteString(MSG_ENTITY, world.fog);
else
WriteByte(MSG_ENTITY, self.cnt * 255.0); // g_balance_weaponswitchdelay
WriteCoord(MSG_ENTITY, self.bouncefactor); // g_balance_grenadelauncher_secondary_bouncefactor
WriteCoord(MSG_ENTITY, self.bouncestop); // g_balance_grenadelauncher_secondary_bouncestop
+ WriteByte(MSG_ENTITY, cvar("g_balance_nex_secondary")); // client has to know if it should zoom or not
+ WriteByte(MSG_ENTITY, cvar("g_balance_campingrifle_secondary")); // client has to know if it should zoom or not
return TRUE;
}
if(self.cvar_g_xonoticversion)
if(time > self.version_nagtime)
{
- if(strstr(self.cvar_g_xonoticversion, "svn", 0) < 0)
+ if(strstr(self.cvar_g_xonoticversion, "git", 0) < 0)
{
- if(strstr(cvar_string("g_xonoticversion"), "svn", 0) >= 0)
+ if(strstr(cvar_string("g_xonoticversion"), "git", 0) >= 0)
{
dprint("^1NOTE^7 to ", self.netname, "^7 - the server is running ^3Xonotic ", cvar_string("g_xonoticversion"), " (beta)^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n");
sprint(self, strcat("\{1}^1NOTE: ^7the server is running ^3Xonotic ", cvar_string("g_xonoticversion"), " (beta)^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n"));
if(frametime)
{
- self.glowmod = colormapPaletteColor(self.clientcolors & 0x0F, TRUE) * 2;
+ if(self.health <= 0 && cvar("g_deathglow"))
+ {
+ if(self.glowmod_x > 0)
+ self.glowmod_x -= cvar("g_deathglow") * frametime;
+ else
+ self.glowmod_x = -1;
+ if(self.glowmod_y > 0)
+ self.glowmod_y -= cvar("g_deathglow") * frametime;
+ else
+ self.glowmod_y = -1;
+ if(self.glowmod_z > 0)
+ self.glowmod_z -= cvar("g_deathglow") * frametime;
+ else
+ self.glowmod_z = -1;
+ }
+ else
+ self.glowmod = colormapPaletteColor(self.clientcolors & 0x0F, TRUE) * 2;
player_powerups();
}
FOR_EACH_PLAYER(other) if(self != other)
{
if(time > other.touchexplode_time)
- if(other.classname == "player")
if(other.deadflag == DEAD_NO)
if not(IS_INDEPENDENT_PLAYER(other))
if(boxesoverlap(self.absmin, self.absmax, other.absmin, other.absmax))
}
if(!zoomstate_set)
- SetZoomState(self.BUTTON_ZOOM || (self.BUTTON_ATCK2 && self.weapon == WEP_NEX));
+ SetZoomState(self.BUTTON_ZOOM || (self.BUTTON_ATCK2 && self.weapon == WEP_NEX) || (self.BUTTON_ATCK2 && self.weapon == WEP_CAMPINGRIFLE && cvar("g_balance_campingrifle_secondary") == 0));
float oldspectatee_status;
oldspectatee_status = self.spectatee_status;
switch(c)
{
case 0:
- case 32:
- case 160:
+ case 32: // space
break;
+ case 192: // charmap space
+ if (!cvar("utf8_enable"))
+ break;
+ return FALSE;
+ case 160: // space in unicode fonts
+ case 0xE000 + 192: // utf8 charmap space
+ if (cvar("utf8_enable"))
+ break;
default:
return FALSE;
}