set g_balance_campingrifle_primary_bulletconstant 130 // 56.3qu
set g_balance_campingrifle_primary_burstcost 0.35 // require same cooldown as secondary, note it's smaller than primary refire time
set g_balance_campingrifle_primary_bullethail 0
+set g_balance_campingrifle_secondary 1
set g_balance_campingrifle_secondary_damage 15
set g_balance_campingrifle_secondary_headshotaddeddamage 25
set g_balance_campingrifle_secondary_spread 0.02
set g_balance_campingrifle_primary_bulletconstant 130 // 56.3qu
set g_balance_campingrifle_primary_burstcost 0
set g_balance_campingrifle_primary_bullethail 0 // empty magazine on shot
+set g_balance_campingrifle_secondary 1
set g_balance_campingrifle_secondary_damage 35
set g_balance_campingrifle_secondary_headshotaddeddamage 15 // 50 damage only on head
set g_balance_campingrifle_secondary_spread 0.008
set g_lms_start_health 250
set g_lms_start_armor 100
set g_lms_start_ammo_shells 30
-set g_lms_start_ammo_nails 300
+set g_lms_start_ammo_nails 250
set g_lms_start_ammo_rockets 100
set g_lms_start_ammo_cells 200
set g_lms_start_ammo_fuel 0
set g_pickup_shells_max 30
set g_pickup_nails 120
set g_pickup_nails_max 300
-set g_pickup_rockets 15
+set g_pickup_rockets 25
set g_pickup_rockets_max 150
set g_pickup_cells 25
set g_pickup_cells_max 200
set g_balance_electro_lightning 1
set g_balance_electro_primary_damage 100
set g_balance_electro_primary_edgedamage 0
-set g_balance_electro_primary_force 800
+set g_balance_electro_primary_force 600
set g_balance_electro_primary_force_up 125
set g_balance_electro_primary_radius 850
set g_balance_electro_primary_comboradius 75
set g_balance_hlac_secondary_shots 6
// }}}
// {{{ campingrifle
-set g_balance_campingrifle_magazinecapacity 8
+set g_balance_campingrifle_magazinecapacity 0
set g_balance_campingrifle_reloadtime 2 // matches reload anim
set g_balance_campingrifle_auto_reload_after_changing_weapons 0
set g_balance_campingrifle_bursttime 0
set g_balance_campingrifle_tracer 1
-set g_balance_campingrifle_primary_damage 60
-set g_balance_campingrifle_primary_headshotaddeddamage 100
+set g_balance_campingrifle_primary_damage 50
+set g_balance_campingrifle_primary_headshotaddeddamage 35
set g_balance_campingrifle_primary_spread 0
set g_balance_campingrifle_primary_force 2
set g_balance_campingrifle_primary_speed 35000
set g_balance_campingrifle_primary_lifetime 5
set g_balance_campingrifle_primary_refire 0.8
-set g_balance_campingrifle_primary_animtime 0.3
+set g_balance_campingrifle_primary_animtime 0.8
set g_balance_campingrifle_primary_ammo 10
set g_balance_campingrifle_primary_bulletconstant 130 // 56.3qu
set g_balance_campingrifle_primary_burstcost 0
set g_balance_campingrifle_primary_bullethail 0 // empty magazine on shot
-set g_balance_campingrifle_secondary_damage 35
-set g_balance_campingrifle_secondary_headshotaddeddamage 15 // 50 damage only on head
+set g_balance_campingrifle_secondary 0
+set g_balance_campingrifle_secondary_damage 15
+set g_balance_campingrifle_secondary_headshotaddeddamage 25 // 50 damage only on head
set g_balance_campingrifle_secondary_spread 0.008
set g_balance_campingrifle_secondary_force 1
set g_balance_campingrifle_secondary_speed 20000
set g_balance_campingrifle_primary_bulletconstant 130 // 56.3qu
set g_balance_campingrifle_primary_burstcost 0.35 // require same cooldown as secondary, note it's smaller than primary refire time
set g_balance_campingrifle_primary_bullethail 0
+set g_balance_campingrifle_secondary 1
set g_balance_campingrifle_secondary_damage 15
set g_balance_campingrifle_secondary_headshotaddeddamage 25
set g_balance_campingrifle_secondary_spread 0.02
set g_balance_campingrifle_primary_bulletconstant 130 // 56.3qu
set g_balance_campingrifle_primary_burstcost 0
set g_balance_campingrifle_primary_bullethail 0 // empty magazine on shot
+set g_balance_campingrifle_secondary 1
set g_balance_campingrifle_secondary_damage 35
set g_balance_campingrifle_secondary_headshotaddeddamage 15 // 50 damage only on head
set g_balance_campingrifle_secondary_spread 0.008
string w_deathtypestring;
vector w_org, w_backoff;
+float campingrifle_scope;
complain_weapon_time = time;
}
+void Net_CampingrifleScope() {
+ campingrifle_scope = TRUE;
+}
+
// CSQC_Parse_TempEntity : Handles all temporary entity network data in the CSQC layer.
// You must ALWAYS first acquire the temporary ID, which is sent as a byte.
// Return value should be 1 if CSQC handled the temporary entity, otherwise return 0 to have the engine process the event.
Net_WeaponComplain();
bHandled = true;
break;
+ case TE_CSQC_CAMPINGRIFLE_SCOPE:
+ Net_CampingrifleScope();
+ bHandled = true;
+ break;
default:
// No special logic for this temporary entity; return 0 so the engine can handle it
bHandled = false;
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())
{
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"))
const float TE_CSQC_NOTIFY = 112;
const float TE_CSQC_WEAPONCOMPLAIN = 113;
const float TE_CSQC_BEAM = 114;
+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;
}
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;
}
.float bot_secondary_campingriflemooth;
+.float sent_campingrifle_scope;
float w_campingrifle(float req)
{
float full;
self.campingrifle_accumulator += cvar("g_balance_campingrifle_primary_burstcost");
}
if (self.BUTTON_ATCK2)
- if (weapon_prepareattack_check(1, cvar("g_balance_campingrifle_secondary_refire")))
- if (time >= self.campingrifle_accumulator + cvar("g_balance_campingrifle_secondary_burstcost"))
- {
- weapon_prepareattack_do(1, cvar("g_balance_campingrifle_secondary_refire"));
- W_CampingRifle_BulletHail(cvar("g_balance_campingrifle_secondary_bullethail"), W_CampingRifle_Attack2, WFRAME_FIRE2, cvar("g_balance_campingrifle_secondary_animtime"), cvar("g_balance_campingrifle_primary_refire"));
- self.campingrifle_accumulator += cvar("g_balance_campingrifle_secondary_burstcost");
+ {
+ if (cvar("g_balance_campingrifle_secondary"))
+ {
+ if (weapon_prepareattack_check(1, cvar("g_balance_campingrifle_secondary_refire")))
+ if (time >= self.campingrifle_accumulator + cvar("g_balance_campingrifle_secondary_burstcost"))
+ {
+ weapon_prepareattack_do(1, cvar("g_balance_campingrifle_secondary_refire"));
+ W_CampingRifle_BulletHail(cvar("g_balance_campingrifle_secondary_bullethail"), W_CampingRifle_Attack2, WFRAME_FIRE2, cvar("g_balance_campingrifle_secondary_animtime"), cvar("g_balance_campingrifle_primary_refire"));
+ self.campingrifle_accumulator += cvar("g_balance_campingrifle_secondary_burstcost");
+ }
+ }
+ else
+ {
+ if(clienttype(self) == CLIENTTYPE_REAL)
+ if(!self.sent_campingrifle_scope)
+ {
+ msg_entity = self;
+ WriteByte(MSG_ONE, SVC_TEMPENTITY);
+ WriteByte(MSG_ONE, TE_CSQC_CAMPINGRIFLE_SCOPE);
+ self.sent_campingrifle_scope = 1;
+ }
+ }
}
}
}
else if (req == WR_PRECACHE)
- {
+ {
precache_model ("models/weapons/g_campingrifle.md3");
precache_model ("models/weapons/v_campingrifle.md3");
precache_model ("models/weapons/h_campingrifle.iqm");