set sv_ready_restart_after_countdown 0 "if set to 1 the players and map items are reset after the countdown ended, otherwise they're reset already at the beginning of the countdown"
set sv_ready_restart_repeatable 0 "allows the players to restart the game as often as needed"
+set sv_hitsound_antispam_time 0.05 "don't play the hitsound more often than this for the electro lightning gun or the laser gauntlet"
+
//nifreks lockonrestart feature, used in team-based game modes, if set to 1 and all players readied up no other player can then join the game anymore, useful to block spectators from joining
set teamplay_lockonrestart 0 "it set to 1 in a team-based game, the teams are locked once all players readied up and the game restarted (no new players can join after restart unless using the server-command unlockteams)"
// use default physics
set sv_friction_on_land 0
- exec physicsNoQWBunny.cfg
+ exec physicsNoQWBunny-nexbased.cfg
set sv_player_viewoffset "0 0 35" "view offset of the player model"
set sv_player_mins "-16 -16 -24" "playermodel mins"
seta hud_panel_weapons_accuracy_color2 "0 1 0"
seta hud_panel_weapons_accuracy_color_levels "0 20 100" "accuracy values at which a specified color (hud_panel_weapons_accuracy_color<X>) will be used. If your accuracy is between 2 of these values then a mix of the Xth and X+1th colors will be used. You can specify up to 10 values, in increasing order"
seta hud_panel_weapons_ammo 1 "show ammo as a status bar"
- seta hud_panel_weapons_ammo_full_shells 40 "show 100% of the status bar at this ammo count"
- seta hud_panel_weapons_ammo_full_nails 100 "show 100% of the status bar at this ammo count"
- seta hud_panel_weapons_ammo_full_cells 60 "show 100% of the status bar at this ammo count"
- seta hud_panel_weapons_ammo_full_rockets 60 "show 100% of the status bar at this ammo count"
+ seta hud_panel_weapons_ammo_full_shells 50 "show 100% of the status bar at this ammo count"
+ seta hud_panel_weapons_ammo_full_nails 200 "show 100% of the status bar at this ammo count"
+ seta hud_panel_weapons_ammo_full_cells 80 "show 100% of the status bar at this ammo count"
+ seta hud_panel_weapons_ammo_full_rockets 80 "show 100% of the status bar at this ammo count"
seta hud_panel_weapons_ammo_full_fuel 100 "show 100% of the status bar at this ammo count"
seta hud_panel_notify_time 10 "time that a new entry stays until it fades out"
zoomspeed = 3.5;
zoomdir = button_zoom;
- if(getstati(STAT_ACTIVEWEAPON) == WEP_NEX) // do NOT use switchweapon here
+ if(getstati(STAT_ACTIVEWEAPON) == WEP_NEX || (getstati(STAT_ACTIVEWEAPON) == WEP_CAMPINGRIFLE && campingrifle_scope)) // do NOT use switchweapon here
zoomdir += button_attack2;
if(spectatee_status > 0 || isdemo())
{
weapontime = time;
last_weapon = activeweapon;
- entity e;
e = get_weaponinfo(activeweapon);
if(e.netname != "")
localcmd(strcat("\ncl_hook_activeweapon ", e.netname), "\n");
reticle_type = 0; // prevent reticle from showing during the respawn zoom effect or for spectators
else if(button_zoom)
reticle_type = 1; // normal zoom
- else if(activeweapon == WEP_NEX && button_attack2)
+ else if(activeweapon == WEP_NEX && button_attack2 || activeweapon == WEP_CAMPINGRIFLE && button_attack2)
reticle_type = 2; // nex zoom
if(cvar("cl_reticle_stretch"))
bullets = 0;
#define CROSSHAIR_DRAW_RING(i,j,sz,wcross_name,wcross_alpha) \
- drawpic(wcross_origin - ('0.5 0 0' * (sz * wcross_size_x * ring_scale + i * wcross_blur) + '0 0.5 0' * (sz * wcross_size_y * ring_scale + j * wcross_blur)), strcat("gfx/hud/", cvar_string("hud_skin"), "/rifle_ring_", ftos(bullets)), sz * wcross_size * ring_scale, wcross_color, wcross_alpha, DRAWFLAG_NORMAL)
+ drawpic(wcross_origin - ('0.5 0 0' * (sz * wcross_size_x * ring_scale + i * wcross_blur) + '0 0.5 0' * (sz * wcross_size_y * ring_scale + j * wcross_blur)), strcat("gfx/rifle_ring_", ftos(bullets)), sz * wcross_size * ring_scale, wcross_color, wcross_alpha, DRAWFLAG_NORMAL)
#define CROSSHAIR_DO_BLUR(M,sz,wcross_name,wcross_alpha) \
do \
switch(hud)
{
case HUD_NORMAL:
+ // do some accuracy var caching
+ float i;
+ if(!(gametype == GAME_RACE || gametype == GAME_CTS))
+ {
+ acc_levels = tokenize(cvar_string("hud_panel_weapons_accuracy_color_levels"));
+ if (acc_levels > MAX_ACCURACY_LEVELS)
+ acc_levels = MAX_ACCURACY_LEVELS;
+
+ for (i = 0; i < acc_levels; ++i)
+ acc_lev[i] = stof(argv(i));
+ }
+
// hud first
HUD_Main();
const float TE_CSQC_TARGET_MUSIC = 111;
const float TE_CSQC_NOTIFY = 112;
const float TE_CSQC_WEAPONCOMPLAIN = 113;
+const float TE_CSQC_CAMPINGRIFLE_SCOPE = 115;
const float RACE_NET_CHECKPOINT_HIT_QUALIFYING = 0; // byte checkpoint, short time, short recordtime, string recordholder
const float RACE_NET_CHECKPOINT_CLEAR = 1;
const float ENT_CLIENT_WARPZONE = 24;
const float ENT_CLIENT_WARPZONE_CAMERA = 25;
const float ENT_CLIENT_TRIGGER_MUSIC = 26;
+const float ENT_CLIENT_HOOK = 27;
+const float ENT_CLIENT_LGBEAM = 28;
+const float ENT_CLIENT_GAUNTLET = 29;
const float ENT_CLIENT_TURRET = 40;
// CSQC centerprint/notify message types
float MSG_SUICIDE = 0;
- float MSG_KILL = 1;
- float MSG_SPREE = 2;
- float MSG_KILL_ACTION = 3;
- float MSG_KILL_ACTION_SPREE = 4;
- float MSG_INFO = 5;
+ float MSG_KILL_MELEE = 1;
+ float MSG_KILL = 2;
+ float MSG_SPREE = 3;
+ float MSG_KILL_ACTION = 4;
+ float MSG_KILL_ACTION_SPREE = 5;
+ float MSG_INFO = 6;
float KILL_TEAM_RED = 10301;
float KILL_TEAM_BLUE = 10302;
float KILL_TYPEFRAG = 10306;
float KILL_TYPEFRAGGED = 10307;
float KILL_FRAG = 10308;
- float KILL_FRAGGED = 10309;
- float KILL_SPREE = 10310;
- float KILL_END_SPREE = 10311;
- float KILL_SPREE_3 = 10312;
- float KILL_SPREE_5 = 10313;
- float KILL_SPREE_10 = 10314;
- float KILL_SPREE_15 = 10315;
- float KILL_SPREE_20 = 10316;
- float KILL_SPREE_25 = 10317;
- float KILL_SPREE_30 = 10318;
-
- float INFO_GOTFLAG = 10319;
- float INFO_PICKUPFLAG = 10320;
- float INFO_LOSTFLAG = 10321;
- float INFO_RETURNFLAG = 10322;
- float INFO_CAPTUREFLAG = 10323;
+ float KILL_FRAG_GAUNTLET = 10309;
+ float KILL_FRAG_SHOTGUN_MELEE = 10310;
+ float KILL_FRAGGED = 10311;
+ float KILL_SPREE = 10312;
+ float KILL_END_SPREE = 10313;
+ float KILL_SPREE_3 = 10314;
+ float KILL_SPREE_5 = 10315;
+ float KILL_SPREE_10 = 10316;
+ float KILL_SPREE_15 = 10317;
+ float KILL_SPREE_20 = 10318;
+ float KILL_SPREE_25 = 10319;
+ float KILL_SPREE_30 = 10320;
+
+ float INFO_GOTFLAG = 10321;
+ float INFO_PICKUPFLAG = 10322;
+ float INFO_LOSTFLAG = 10323;
+ float INFO_RETURNFLAG = 10324;
+ float INFO_CAPTUREFLAG = 10325;
// weapon requests
float WR_SETUP = 1; // (SVQC) setup weapon data
attacker.taunt_soundtime = time + 1;
// TODO: fix this?
- if (deathtype == DEATH_CUSTOM)
- msg = strcat(deathmessage, " by ^1", msg);
- else if (deathtype == DEATH_HURTTRIGGER && inflictor.message2 != "")
- {
- msg = ftos(strstrofs(inflictor.message2, "#", 0));
- }
- Send_KillNotification(s, a, msg, deathtype, MSG_KILL);
+ if (deathtype == DEATH_CUSTOM)
+ msg = strcat(deathmessage, " by ^1", msg);
+ else if (deathtype == DEATH_HURTTRIGGER && inflictor.message2 != "")
+ {
+ msg = ftos(strstrofs(inflictor.message2, "#", 0));
+ }
+
+ float msgtype;
+ w = DEATH_WEAPONOF(deathtype);
+ if(w == WEP_LASER && ((cvar("g_balance_laser_secondary_gauntlet") && w & HITTYPE_SECONDARY) || (cvar("g_balance_laser_primary_gauntlet") && !(w & HITTYPE_SECONDARY))))
+ {
+ msgtype = MSG_KILL_MELEE;
+ deathtype = KILL_FRAG_GAUNTLET;
+ }
+ else if(w == WEP_SHOTGUN && (cvar("g_balance_shotgun_secondary_melee") && w & HITTYPE_SECONDARY))
+ {
+ msgtype = MSG_KILL_MELEE;
+ deathtype = KILL_FRAG_SHOTGUN_MELEE;
+ }
+
+ Send_KillNotification(s, a, msg, deathtype, MSG_KILL);
if(g_ctf && targ.flagcarried)
{
if (attacker.killcount > 2) {
Send_KillNotification(a, ftos(attacker.killcount), "", KILL_SPREE, MSG_SPREE);
}
-
- LogDeath("frag", deathtype, attacker, targ);
-
- if (attacker.killcount == 3)
+ else if (attacker.killcount == 3)
{
Send_KillNotification(a, "", "", KILL_SPREE_3, MSG_SPREE);
AnnounceTo(attacker, "03kills");
Send_KillNotification(a, "", "", KILL_SPREE_30, MSG_SPREE);
AnnounceTo(attacker, "30kills");
}
+ LogDeath("frag", deathtype, attacker, targ);
}
}
else
entity damage_targ;
entity damage_inflictor;
entity damage_attacker;
+.float prevhitsound;
void Damage (entity targ, entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
{
{
if(damage > 0)
{
- if(targ.BUTTON_CHAT)
- attacker.typehitsound += 1;
- else
- attacker.hitsound += 1;
+ if(attacker.weapon != WEP_ELECTRO && attacker.weapon != WEP_LASER || ((attacker.weapon == WEP_ELECTRO && cvar("g_balance_electro_lightning") || attacker.weapon == WEP_LASER) && attacker.prevhitsound + cvar("sv_hitsound_antispam_time") < time))
+ {
+ if(targ.BUTTON_CHAT)
+ attacker.typehitsound += 1;
+ else
+ attacker.hitsound += 1;
+ attacker.prevhitsound = time;
+ }
damage_goodhits += 1;
damage_gooddamage += damage;