float w_issilent, w_random;
vector w_org, w_backoff;
-float rifle_scope;
-float vortex_scope;
-
-float minelayer_maxmines;
-
-float hagar_maxrockets;
-
float bgmtime;
string weaponorder_byimpulse;
#define player_currententnum (spectatee_status > 0 ? spectatee_status : player_localnum + 1)
-float g_balance_porto_secondary;
#endif
armorblockpercent = ReadByte() / 255.0;
- g_balance_mortar_bouncefactor = ReadCoord();
- g_balance_mortar_bouncestop = ReadCoord();
- g_balance_electro_secondary_bouncefactor = ReadCoord();
- g_balance_electro_secondary_bouncestop = ReadCoord();
-
- vortex_scope = !ReadByte();
- rifle_scope = !ReadByte();
-
serverflags = ReadByte();
- minelayer_maxmines = ReadByte();
-
- hagar_maxrockets = ReadByte();
-
g_trueaim_minrange = ReadCoord();
- g_balance_porto_secondary = ReadByte();
+
return = true;
MUTATOR_CALLHOOK(Ent_Init);
.float ping, ping_packetloss, ping_movementloss;
-float g_balance_mortar_bouncefactor;
-float g_balance_mortar_bouncestop;
-float g_balance_electro_secondary_bouncefactor;
-float g_balance_electro_secondary_bouncestop;
float g_trueaim_minrange;
float hud;
if(activeweapon != WEP_PORTO || spectatee_status || gametype == MAPINFO_TYPE_NEXBALL)
return;
- if(g_balance_porto_secondary)
+ if(WEP_CVAR(porto, secondary))
return;
if(intermission == 1)
return;
zoomdir = button_zoom;
if(hud == HUD_NORMAL)
if(switchweapon == activeweapon)
- if((activeweapon == WEP_VORTEX && vortex_scope) || (activeweapon == WEP_RIFLE && rifle_scope)) // do NOT use switchweapon here
+ if((activeweapon == WEP_VORTEX && !WEP_CVAR(vortex, secondary)) || (activeweapon == WEP_RIFLE && !WEP_CVAR(rifle, secondary))) // do NOT use switchweapon here
zoomdir += button_attack2;
if(spectatee_status > 0 || isdemo())
{
ring_rgb = wcross_color;
ring_image = "gfx/crosshair_ring_nexgun.tga";
}
- else if (autocvar_crosshair_ring && activeweapon == WEP_MINE_LAYER && minelayer_maxmines && autocvar_crosshair_ring_minelayer)
+ else if (autocvar_crosshair_ring && activeweapon == WEP_MINE_LAYER && WEP_CVAR(minelayer, limit) && autocvar_crosshair_ring_minelayer)
{
- ring_value = bound(0, STAT(LAYED_MINES) / minelayer_maxmines, 1); // if you later need to use the count of bullets in another place, then add a float for it. For now, no need to.
+ ring_value = bound(0, STAT(LAYED_MINES) / WEP_CVAR(minelayer, limit), 1); // if you later need to use the count of bullets in another place, then add a float for it. For now, no need to.
ring_alpha = autocvar_crosshair_ring_minelayer_alpha;
ring_rgb = wcross_color;
ring_image = "gfx/crosshair_ring.tga";
}
else if (activeweapon == WEP_HAGAR && STAT(HAGAR_LOAD) && autocvar_crosshair_ring_hagar)
{
- ring_value = bound(0, STAT(HAGAR_LOAD) / hagar_maxrockets, 1);
+ ring_value = bound(0, STAT(HAGAR_LOAD) / WEP_CVAR_SEC(hagar, load_max), 1);
ring_alpha = autocvar_crosshair_ring_hagar_alpha;
ring_rgb = wcross_color;
ring_image = "gfx/crosshair_ring.tga";
self.maxs = '0 0 -4';
self.move_movetype = MOVETYPE_BOUNCE;
self.move_touch = func_null;
- self.move_bounce_factor = g_balance_electro_secondary_bouncefactor;
- self.move_bounce_stopspeed = g_balance_electro_secondary_bouncestop;
+ self.move_bounce_factor = WEP_CVAR_SEC(electro, bouncefactor);
+ self.move_bounce_stopspeed = WEP_CVAR_SEC(electro, bouncestop);
break;
case PROJECTILE_RPC:
case PROJECTILE_ROCKET:
self.maxs = '3 3 3';
self.move_movetype = MOVETYPE_BOUNCE;
self.move_touch = func_null;
- self.move_bounce_factor = g_balance_mortar_bouncefactor;
- self.move_bounce_stopspeed = g_balance_mortar_bouncestop;
+ self.move_bounce_factor = WEP_CVAR(mortar, bouncefactor);
+ self.move_bounce_stopspeed = WEP_CVAR(mortar, bouncestop);
break;
case PROJECTILE_SHAMBLER_LIGHTNING:
self.mins = '-8 -8 -8';
self.maxs = '0 0 -4';
self.move_movetype = MOVETYPE_BOUNCE;
self.move_touch = func_null;
- self.move_bounce_factor = g_balance_electro_secondary_bouncefactor;
- self.move_bounce_stopspeed = g_balance_electro_secondary_bouncestop;
+ self.move_bounce_factor = WEP_CVAR_SEC(electro, bouncefactor);
+ self.move_bounce_stopspeed = WEP_CVAR_SEC(electro, bouncestop);
break;
*/
default:
else
WriteString(channel, "");
WriteByte(channel, self.count * 255.0); // g_balance_armor_blockpercent
- WriteCoord(channel, self.bouncefactor); // g_balance_mortar_bouncefactor // WEAPONTODO
- WriteCoord(channel, self.bouncestop); // g_balance_mortar_bouncestop
- WriteCoord(channel, self.ebouncefactor); // g_balance_mortar_bouncefactor
- WriteCoord(channel, self.ebouncestop); // g_balance_mortar_bouncestop
- WriteByte(channel, WEP_CVAR(vortex, secondary)); // client has to know if it should zoom or not // WEAPONTODO
- WriteByte(channel, WEP_CVAR(rifle, secondary)); // client has to know if it should zoom or not // WEAPONTODO
WriteByte(channel, serverflags); // client has to know if it should zoom or not
- WriteByte(channel, WEP_CVAR(minelayer, limit)); // minelayer max mines // WEAPONTODO
- WriteByte(channel, WEP_CVAR_SEC(hagar, load_max)); // hagar max loadable rockets // WEAPONTODO
WriteCoord(channel, autocvar_g_trueaim_minrange);
- WriteByte(channel, WEP_CVAR(porto, secondary)); // WEAPONTODO
MUTATOR_CALLHOOK(Ent_Init);
}
self.count = autocvar_g_balance_armor_blockpercent;
self.SendFlags |= 1;
}
- if(self.bouncefactor != autocvar_g_balance_mortar_bouncefactor) // WEAPONTODO
- {
- self.bouncefactor = autocvar_g_balance_mortar_bouncefactor;
- self.SendFlags |= 1;
- }
- if(self.bouncestop != autocvar_g_balance_mortar_bouncestop)
- {
- self.bouncestop = autocvar_g_balance_mortar_bouncestop;
- self.SendFlags |= 1;
- }
- if(self.ebouncefactor != autocvar_g_balance_electro_secondary_bouncefactor)
- {
- self.ebouncefactor = autocvar_g_balance_electro_secondary_bouncefactor;
- self.SendFlags |= 1;
- }
- if(self.ebouncestop != autocvar_g_balance_electro_secondary_bouncestop)
- {
- self.ebouncestop = autocvar_g_balance_electro_secondary_bouncestop;
- self.SendFlags |= 1;
- }
}
void ClientInit_Spawn()