#include "wall.qh"
#include "waypointsprites.qh"
-#include "vehicles/vehicles.qh"
-
-#include "../server/vehicles/bumblebee.qh"
+#include "../common/vehicles/unit/bumblebee.qh"
+#include "../common/vehicles/cl_vehicles.qh"
+#include "../common/vehicles/vehicles.qh"
#include "../common/net_notice.qh"
// needs to be done so early because of the constants they create
CALL_ACCUMULATED_FUNCTION(RegisterWeapons);
+ CALL_ACCUMULATED_FUNCTION(RegisterVehicles);
CALL_ACCUMULATED_FUNCTION(RegisterMonsters);
CALL_ACCUMULATED_FUNCTION(RegisterGametypes);
CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
Hook_Precache();
GibSplash_Precache();
Casings_Precache();
- Vehicles_Precache();
turrets_precache();
Tuba_Precache();
CSQCPlayer_Precache();
WarpZone_Init();
hud_skin_path = strzone(strcat("gfx/hud/", autocvar_hud_skin));
- hud_configure_prev = -1;
-
draw_currentSkin = strzone(strcat("gfx/menu/", cvar_string("menu_skin")));
}
float reticle_type;
string reticle_image;
string NextFrameCommand;
-void CSQC_SPIDER_HUD();
-void CSQC_RAPTOR_HUD();
vector freeze_org, freeze_ang;
entity nightvision_noise, nightvision_noise2;
wcross_alpha_goal_prev = wcross_alpha;
wcross_color_goal_prev = wcross_color;
- if(shottype == SHOTTYPE_HITTEAM || (shottype == SHOTTYPE_HITOBSTRUCTION && autocvar_crosshair_hittest_blur && !autocvar_chase_active))
+ if(spectatee_status == -1 && shottype == SHOTTYPE_HITTEAM || (shottype == SHOTTYPE_HITOBSTRUCTION && autocvar_crosshair_hittest_blur && !autocvar_chase_active))
{
wcross_blur = 1;
wcross_alpha *= 0.75;
HUD_Panel_Mouse();
if(hud && !intermission)
- {
- if(hud == HUD_SPIDERBOT)
- CSQC_SPIDER_HUD();
- else if(hud == HUD_WAKIZASHI)
- CSQC_WAKIZASHI_HUD();
- else if(hud == HUD_RAPTOR)
- CSQC_RAPTOR_HUD();
- else if(hud == HUD_BUMBLEBEE)
- CSQC_BUMBLE_HUD();
- else if(hud == HUD_BUMBLEBEE_GUN)
- CSQC_BUMBLE_GUN_HUD();
- }
+ if(hud == HUD_BUMBLEBEE_GUN)
+ CSQC_BUMBLE_GUN_HUD();
+ else
+ VEH_ACTION(hud, VR_HUD);
cl_notice_run();
#include "../../common/notifications.qh"
#include "../../common/deathtypes.qh"
#include "../mutators/mutators_include.qh"
- #include "../vehicles/vehicles_def.qh"
+ #include "../../common/vehicles/sv_vehicles.qh"
#include "../campaign.qh"
#include "../../common/mapinfo.qh"
#include "common.qh"
void SV_ParseClientCommand(string command)
{
+ // If invalid UTF-8, don't even parse it
+ string command2 = "";
+ float len = strlen(command);
+ float i;
+ for (i = 0; i < len; ++i)
+ command2 = strcat(command2, chr2str(str2chr(command, i)));
+ if (command != command2)
+ return;
+
// if we're banned, don't even parse the command
if(Ban_MaybeEnforceBanOnce(self))
return;
#include "../common/teams.qh"
#include "../common/util.qh"
#include "../common/monsters/sv_monsters.qh"
+ #include "../common/vehicles/vehicles.qh"
#include "../common/weapons/weapons.qh"
#include "weapons/weaponstats.qh"
#include "autocvars.qh"
// does nothing visible
BADCVAR("captureleadlimit_override");
BADCVAR("g_balance_kill_delay");
+ BADCVAR("g_ca_point_limit");
BADCVAR("g_ca_point_leadlimit");
BADCVAR("g_ctf_captimerecord_always");
BADCVAR("g_ctf_flag_glowtrails");
BADCVAR("g_ctf_flag_pickup_verbosename");
BADCVAR("g_domination_point_leadlimit");
BADCVAR("g_forced_respawn");
+ BADCVAR("g_freezetag_point_limit");
+ BADCVAR("g_freezetag_point_leadlimit");
BADCVAR("g_keyhunt_point_leadlimit");
BADPREFIX("g_mod_");
+ BADCVAR("g_invasion_point_limit");
BADCVAR("g_nexball_goalleadlimit");
+ BADCVAR("g_tdm_point_limit");
+ BADCVAR("g_tdm_point_leadlimit");
BADCVAR("leadlimit_and_fraglimit");
BADCVAR("leadlimit_override");
BADCVAR("pausable");
// needs to be done so early because of the constants they create
CALL_ACCUMULATED_FUNCTION(RegisterWeapons);
+ CALL_ACCUMULATED_FUNCTION(RegisterVehicles);
CALL_ACCUMULATED_FUNCTION(RegisterMonsters);
CALL_ACCUMULATED_FUNCTION(RegisterGametypes);
CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
// needs to be done so early because of the constants they create
CALL_ACCUMULATED_FUNCTION(RegisterWeapons);
+ CALL_ACCUMULATED_FUNCTION(RegisterVehicles);
CALL_ACCUMULATED_FUNCTION(RegisterMonsters);
CALL_ACCUMULATED_FUNCTION(RegisterGametypes);
CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
void nade_touch()
{
- float is_weapclip = 0;
+ /*float is_weapclip = 0;
if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NODRAW)
if (!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NONSOLID))
if (!(trace_dphitcontents & DPCONTENTS_OPAQUE))
- is_weapclip = 1;
- if(ITEM_TOUCH_NEEDKILL() || is_weapclip)
+ is_weapclip = 1;*/
+ if(ITEM_TOUCH_NEEDKILL()) // || is_weapclip)
{
remove(self);
return;
Kill_Notification(NOTIF_ONE_ONLY, e, MSG_CENTER_CPID, CPID_NADES);
- setorigin(_nade, w_shotorg + (v_right * 25) * -1);
+ vector offset = (v_forward * autocvar_g_nades_throw_offset.x)
+ + (v_right * autocvar_g_nades_throw_offset.y)
+ + (v_up * autocvar_g_nades_throw_offset.z);
+ if(autocvar_g_nades_throw_offset == '0 0 0')
+ offset = '0 0 0';
+
+ setorigin(_nade, w_shotorg + offset + (v_right * 25) * -1);
//setmodel(_nade, "models/weapons/v_ok_grenade.md3");
//setattachment(_nade, world, "");
PROJECTILE_MAKETRIGGER(_nade);
if (trace_startsolid)
setorigin(_nade, e.origin);
- if(self.v_angle.x >= 70 && self.v_angle.x <= 110)
+ if(self.v_angle.x >= 70 && self.v_angle.x <= 110 && self.BUTTON_CROUCH)
_nade.velocity = '0 0 100';
else if(autocvar_g_nades_nade_newton_style == 1)
_nade.velocity = e.velocity + _velocity;
if (!autocvar_g_nades)
return false; // allow turning them off mid match
- if(forbidWeaponUse())
+ if(forbidWeaponUse(self))
return false;
if (!IS_PLAYER(self))
MUTATOR_HOOKFUNCTION(ok_PlayerDies)
{
entity oldself = self;
+ entity targ = ((frag_attacker) ? frag_attacker : frag_target);
if(self.flags & FL_MONSTER)
{
self.gravity = 1;
self.reset = SUB_Remove;
setorigin(self, frag_target.origin + '0 0 32');
- self.velocity = '0 0 200' + normalize(frag_attacker.origin - self.origin) * 500;
+ self.velocity = '0 0 200' + normalize(targ.origin - self.origin) * 500;
self.classname = "droppedweapon"; // hax
SUB_SetFade(self, time + 5, 1);
self = oldself;
ok_IncreaseCharge(self, self.weapon);
if(self.BUTTON_ATCK2)
- if(!forbidWeaponUse() || self.weapon_blocked) // allow if weapon is blocked
+ if(!forbidWeaponUse(self) || self.weapon_blocked) // allow if weapon is blocked
if(time >= self.jump_interval)
{
self.jump_interval = time + WEP_CVAR_PRI(blaster, refire) * W_WeaponRateFactor();
makevectors(self.v_angle);
+ int oldwep = self.weapon;
+ self.weapon = WEP_BLASTER;
W_Blaster_Attack(
WEP_BLASTER | HITTYPE_SECONDARY,
WEP_CVAR_SEC(vaporizer, shotangle),
WEP_CVAR_SEC(vaporizer, delay),
WEP_CVAR_SEC(vaporizer, lifetime)
);
+ self.weapon = oldwep;
}
self.weapon_blocked = false;