float autocvar_cl_spawnzoom_speed = 1;
float autocvar_cl_spawnzoom_factor = 2;
bool autocvar_cl_stripcolorcodes;
-float autocvar_cl_vehicle_spiderbot_cross_alpha = 0.6;
-float autocvar_cl_vehicle_spiderbot_cross_size = 1;
-bool autocvar_cl_vehicles_hud_tactical = 1;
bool autocvar_cl_velocityzoom_enabled;
float autocvar_cl_velocityzoom_factor;
int autocvar_cl_velocityzoom_type = 3;
float autocvar_hud_panel_notify_time;
float autocvar_hud_panel_notify_icon_aspect;
bool autocvar_hud_panel_physics;
+ float autocvar_hud_panel_physics_acceleration_movingaverage = 1;
float autocvar_hud_panel_physics_acceleration_progressbar_mode;
float autocvar_hud_panel_physics_acceleration_progressbar_scale;
float autocvar_hud_panel_physics_acceleration_progressbar_nonlinear;
float autocvar_hud_panel_physics_acceleration_max;
+ float autocvar_hud_panel_physics_update_interval;
int autocvar_hud_panel_physics_progressbar;
bool autocvar_hud_panel_physics_acceleration_vertical;
int autocvar_hud_panel_physics_baralign;
- #if defined(CSQC)
- #include "../dpdefs/csprogsdefs.qh"
- #include "defs.qh"
- #include "../common/constants.qh"
- #include "../common/util.qh"
- #include "../common/weapons/weapons.qh"
- #include "autocvars.qh"
- #include "../common/deathtypes.qh"
- #include "damage.qh"
- #include "movetypes.qh"
- #include "prandom.qh"
- #include "../common/vehicles/cl_vehicles.qh"
- #elif defined(MENUQC)
- #elif defined(SVQC)
- #endif
+ #include "damage.qh"
+ #include "_all.qh"
+
+ #include "gibs.qh"
+ #include "movetypes.qh"
+ #include "prandom.qh"
+
-#include "vehicles/all.qh"
++#include "../common/vehicles/cl_vehicles.qh"
+
+ #include "../common/constants.qh"
+ #include "../common/deathtypes.qh"
+ #include "../common/util.qh"
+
+ #include "../common/weapons/all.qh"
+
+ .entity tag_entity;
+
+ .float cnt;
+ .int state;
+ .bool isplayermodel;
void DamageEffect_Think()
{
+ #include "main.qh"
+ #include "_all.qh"
+
+ #include "casings.qh"
+ #include "csqcmodel_hooks.qh"
+ #include "damage.qh"
+ #include "effects.qh"
+ #include "gibs.qh"
+ #include "hook.qh"
+ #include "hud.qh"
+ #include "hud_config.qh"
+ #include "laser.qh"
#include "mapvoting.qh"
#include "modeleffects.qh"
#include "particles.qh"
+ #include "prandom.qh"
#include "scoreboard.qh"
#include "shownames.qh"
+ #include "sortlist.qh"
#include "target_music.qh"
#include "tturrets.qh"
#include "tuba.qh"
+ #include "t_items.qh"
#include "wall.qh"
#include "waypointsprites.qh"
-#include "vehicles/bumblebee.qh"
-#include "vehicles/all.qh"
+#include "../common/vehicles/unit/bumblebee.qh"
+#include "../common/vehicles/cl_vehicles.qh"
+#include "../common/vehicles/vehicles.qh"
+ #include "weapons/projectile.qh"
+
+ #include "../common/buffs.qh"
+ #include "../common/deathtypes.qh"
+ #include "../common/mapinfo.qh"
+ #include "../common/monsters/all.qh"
+ #include "../common/nades.qh"
#include "../common/net_notice.qh"
+ #include "../common/notifications.qh"
+ #include "../common/stats.qh"
+ #include "../common/teams.qh"
+
+ #include "../common/items/all.qh"
+
+ #include "../common/weapons/all.qh"
- #include "../common/monsters/monsters.qh"
+ #include "../csqcmodellib/cl_model.qh"
+ #include "../csqcmodellib/interpolate.qh"
#include "../warpzonelib/client.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(RegisterItems);
CALL_ACCUMULATED_FUNCTION(RegisterGametypes);
CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
Hook_Precache();
GibSplash_Precache();
Casings_Precache();
- Vehicles_Precache();
turrets_precache();
Tuba_Precache();
CSQCPlayer_Precache();
case ENT_CLIENT_WARPZONE_TELEPORTED: WarpZone_Teleported_Read(bIsNewEntity); break;
case ENT_CLIENT_TRIGGER_MUSIC: Ent_ReadTriggerMusic(); break;
case ENT_CLIENT_HOOK: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_HOOK); break;
+ case ENT_CLIENT_INVENTORY: Inventory_Read(self); break;
case ENT_CLIENT_ARC_BEAM: Ent_ReadArcBeam(bIsNewEntity); break;
case ENT_CLIENT_ACCURACY: Ent_ReadAccuracy(); break;
case ENT_CLIENT_AUXILIARYXHAIR: Net_AuXair2(bIsNewEntity); break;
effects.qc
gibs.qc
hook.qc
- hud_config.qc
hud.qc
+ hud_config.qc
laser.qc
main.qc
mapvoting.qc
miscfunctions.qc
modeleffects.qc
+ movelib.qc
movetypes.qc
noise.qc
particles.qc
teamradar.qc
tturrets.qc
tuba.qc
+ t_items.qc
view.qc
wall.qc
waypointsprites.qc
- command/cl_cmd.qc
+ command/all.qc
-vehicles/bumblebee.qc
-vehicles/all.qc
-
weapons/projectile.qc // TODO
../common/animdecide.qc
../common/urllib.qc
../common/util.qc
- ../common/command/generic.qc
- ../common/command/markup.qc
- ../common/command/rpn.qc
+ ../common/items/all.qc
- ../common/monsters/monsters.qc
+ ../common/monsters/all.qc
- ../common/weapons/weapons.qc // TODO
+ ../common/weapons/all.qc // TODO
../csqcmodellib/cl_model.qc
../csqcmodellib/cl_player.qc
../csqcmodellib/interpolate.qc
- ../server/movelib.qc
- ../server/t_items.qc
+../common/vehicles/vehicles_include.qc
+
../warpzonelib/anglestransform.qc
../warpzonelib/client.qc
../warpzonelib/common.qc
#include "tturrets.qh"
+ #include "_all.qh"
+
+ #include "hud.qh"
+ #include "movelib.qh"
+ #include "movetypes.qh"
+ #include "prandom.qh"
+ #include "teamradar.qh"
#include "waypointsprites.qh"
- #include "../server/movelib.qh"
+ #include "../common/teams.qh"
+
+ #include "../server/tturrets/include/turrets_early.qh"
+
+ #include "../warpzonelib/anglestransform.qh"
+ #include "../warpzonelib/mathlib.qh"
+
+ .vector colormod;
+ .float cnt;
+ .float alpha;
+ .float gravity;
string tid2info_base;
string tid2info_head;
precache_model ("models/turrets/head-gib2.md3");
precache_model ("models/turrets/head-gib3.md3");
precache_model ("models/turrets/head-gib4.md3");
- precache_model ("models/turrets/terrainbase.md3");
precache_model ("models/turrets/base.md3");
precache_model ("models/turrets/rocket.md3");
}
self.tur_head = world;
}
- .vector glowmod;
+ class(Turret) .vector glowmod;
void turret_changeteam()
{
switch(self.team - 1)
return; // Dont draw wp's for turrets out of view
o.z = 0;
if(hud != HUD_NORMAL)
- {
- switch(hud)
- {
- case HUD_SPIDERBOT:
- case HUD_WAKIZASHI:
- case HUD_RAPTOR:
- case HUD_BUMBLEBEE:
- if(self.turret_type == TID_EWHEEL || self.turret_type == TID_WALKER)
- txt = "gfx/vehicles/vth-mover.tga";
- else
- txt = "gfx/vehicles/vth-stationary.tga";
-
- vector pz = drawgetimagesize(txt) * 0.25;
- drawpic(o - pz * 0.5, txt, pz , '1 1 1', 0.75, DRAWFLAG_NORMAL);
- break;
- }
+ {
+ if(self.turret_type == TID_EWHEEL || self.turret_type == TID_WALKER)
+ txt = "gfx/vehicles/vth-mover.tga";
+ else
+ txt = "gfx/vehicles/vth-stationary.tga";
+
+ vector pz = drawgetimagesize(txt) * 0.25;
+ drawpic(o - pz * 0.5, txt, pz , '1 1 1', 0.75, DRAWFLAG_NORMAL);
}
}
- #if defined(CSQC)
- #include "../dpdefs/csprogsdefs.qh"
- #include "defs.qh"
- #include "../common/constants.qh"
- #include "../common/stats.qh"
- #include "../warpzonelib/mathlib.qh"
- #include "../warpzonelib/common.qh"
- #include "../warpzonelib/client.qh"
- #include "../common/teams.qh"
- #include "../common/util.qh"
- #include "../common/nades.qh"
- #include "../common/weapons/weapons.qh"
- #include "../common/mapinfo.qh"
- #include "autocvars.qh"
- #include "hud.qh"
- #include "scoreboard.qh"
- #include "noise.qh"
- #include "main.qh"
- #include "../csqcmodellib/cl_player.qh"
- #elif defined(MENUQC)
- #elif defined(SVQC)
- #endif
+ #include "_all.qh"
+
+ #include "announcer.qh"
+ #include "hook.qh"
+ #include "hud.qh"
+ #include "hud_config.qh"
+ #include "mapvoting.qh"
+ #include "noise.qh"
+ #include "scoreboard.qh"
+ #include "shownames.qh"
+ #include "target_music.qh"
-#include "vehicles/all.qh"
+ #include "waypointsprites.qh"
+
+ #include "../common/constants.qh"
+ #include "../common/mapinfo.qh"
+ #include "../common/nades.qh"
+ #include "../common/stats.qh"
+ #include "../common/teams.qh"
+ #include "../common/util.qh"
+
+ #include "../common/weapons/all.qh"
+
++#include "../common/vehicles/cl_vehicles.qh"
++
+ #include "../csqcmodellib/cl_player.qh"
+
+ #include "../warpzonelib/client.qh"
+ #include "../warpzonelib/common.qh"
+ #include "../warpzonelib/mathlib.qh"
entity porto;
vector polyline[16];
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;
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 "waypointsprites.qh"
+ #include "_all.qh"
+
+ #include "hud.qh"
+ #include "teamradar.qh"
+
+ #include "../common/buffs.qh"
+ #include "../common/constants.qh"
+ #include "../common/teams.qh"
+
+ #include "../common/weapons/all.qh"
+
+ #include "../csqcmodellib/interpolate.qh"
+
+ #include "../warpzonelib/mathlib.qh"
+
+ .float alpha;
void drawrotpic(vector org, float rot, string pic, vector sz, vector hotspot, vector rgb, float a, float f)
{
case "frozen": return _("Frozen!");
case "tagged-target": return _("Tagged");
case "vehicle": return _("Vehicle");
+ case "intruder": return _("Intruder!");
default: return s;
}
}
const int ENT_CLIENT_WARPZONE_CAMERA = 25;
const int ENT_CLIENT_TRIGGER_MUSIC = 26;
const int ENT_CLIENT_HOOK = 27;
+ const int ENT_CLIENT_INVENTORY = 28;
const int ENT_CLIENT_ARC_BEAM = 29; // WEAPONTODO: fix numbers
const int ENT_CLIENT_ACCURACY = 30;
const int ENT_CLIENT_SHOWNAMES = 31;
const int CTF_STATE_COMMANDER = 3;
const int HUD_NORMAL = 0;
-const int HUD_VEHICLE_FIRST = 10;
-const int HUD_SPIDERBOT = 10;
-const int HUD_WAKIZASHI = 11;
-const int HUD_RAPTOR = 12;
-const int HUD_BUMBLEBEE = 13;
-const int HUD_BUMBLEBEE_GUN = 14;
-const int HUD_VEHICLE_LAST = 14;
+const int HUD_BUMBLEBEE_GUN = 25;
const vector eX = '1 0 0';
const vector eY = '0 1 0';
const int URI_GET_URLLIB = 128;
const int URI_GET_URLLIB_END = 191;
- // gametype votes
- const int GTV_AVAILABLE = 0;
- // for later use in per-map gametype filtering
- const int GTV_FORBIDDEN = 2;
+ // gametype vote flags
+ const int GTV_FORBIDDEN = 0; // Cannot be voted
+ const int GTV_AVAILABLE = 1; // Can be voted
+ const int GTV_CUSTOM = 2; // Custom entry
#endif
#include "../constants.qh"
#include "../teams.qh"
#include "../util.qh"
- #include "monsters.qh"
+ #include "all.qh"
#include "sv_monsters.qh"
- #include "../weapons/weapons.qh"
+ #include "../weapons/all.qh"
#include "../../server/autocvars.qh"
#include "../../server/defs.qh"
#include "../deathtypes.qh"
#include "../../server/mutators/mutators_include.qh"
#include "../../server/tturrets/include/turrets_early.qh"
- #include "../../server/vehicles/vehicle.qh"
+ #include "../vehicles/sv_vehicles.qh"
#include "../../server/campaign.qh"
#include "../../server/command/common.qh"
#include "../../server/command/cmd.qh"
field = GetMonsterSoundSampleField(argv(0));
if(GetMonsterSoundSampleField_notFound)
continue;
- if(self.field)
- strunzone(self.field);
- self.field = strzone(strcat(argv(1), " ", argv(2)));
+ if (self.(field))
+ strunzone(self.(field));
+ self.(field) = strzone(strcat(argv(1), " ", argv(2)));
}
fclose(fh);
return 1;
if(delaytoo)
if(time < self.msound_delay)
return; // too early
- GlobalSound(self.samplefield, chan, VOICETYPE_PLAYERSOUND);
+ GlobalSound(self.(samplefield), chan, VOICETYPE_PLAYERSOUND);
self.msound_delay = time + sound_delay;
}
makevectors(self.v_angle);
}
- float monster_melee(entity targ, float damg, float anim, float er, float anim_finished, float deathtype, float dostop)
+ float monster_melee(entity targ, float damg, float anim, float er, float anim_finished, int deathtype, float dostop)
{
if (self.health <= 0)
return false; // attacking while dead?!
self.moveto = self.origin;
}
- void monsters_corpse_damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+ void monsters_corpse_damage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
{
self.health -= damage;
MON_ACTION(self.monsterid, MR_DEATH);
}
- void monsters_damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+ void monsters_damage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
{
if(self.frozen && deathtype != DEATH_KILL && deathtype != DEATH_NADE_ICE_FREEZE)
return;
#include "constants.qh"
#include "teams.qh"
+ #include "util.qh"
// ================================================
// Unified notification system, written by Samual
MSG_CENTER_NOTIF(1, CENTER_OVERTIME_TIME, 0, 1, "f1time", CPID_OVERTIME, "0 0", _("^F2Now playing ^F4OVERTIME^F2!\n^BGAdded ^F4%s^BG to the game!"), "") \
MSG_CENTER_NOTIF(1, CENTER_PORTO_CREATED_IN, 0, 0, "", NO_CPID, "0 0", _("^K1In^BG-portal created"), "") \
MSG_CENTER_NOTIF(1, CENTER_PORTO_CREATED_OUT, 0, 0, "", NO_CPID, "0 0", _("^F3Out^BG-portal created"), "") \
- MSG_CENTER_NOTIF(1, CENTER_PORTO_FAILED, 0, 0, "", NO_CPID, "0 0", _("^K1Portal deployment failed.\n\n^F2Catch it to try again!"), "") \
+ MSG_CENTER_NOTIF(1, CENTER_PORTO_FAILED, 0, 0, "", NO_CPID, "0 0", _("^F1Portal creation failed"), "") \
MSG_CENTER_NOTIF(1, CENTER_POWERDOWN_INVISIBILITY, 0, 0, "", CPID_POWERUP, "0 0", _("^F2Invisibility has worn off"), "") \
MSG_CENTER_NOTIF(1, CENTER_POWERDOWN_SHIELD, 0, 0, "", CPID_POWERUP, "0 0", _("^F2Shield has worn off"), "") \
MSG_CENTER_NOTIF(1, CENTER_POWERDOWN_SPEED, 0, 0, "", CPID_POWERUP, "0 0", _("^F2Speed has worn off"), "") \
MSG_CENTER_NOTIF(1, CENTER_TEAMCHANGE_SUICIDE, 0, 1, "", CPID_TEAMCHANGE, "1 f1", _("^K1Suicide in ^COUNT"), "") \
MSG_CENTER_NOTIF(1, CENTER_TIMEOUT_BEGINNING, 0, 1, "", CPID_TIMEOUT, "1 f1", _("^F4Timeout begins in ^COUNT"), "") \
MSG_CENTER_NOTIF(1, CENTER_TIMEOUT_ENDING, 0, 1, "", CPID_TIMEOUT, "1 f1", _("^F4Timeout ends in ^COUNT"), "") \
+ MSG_CENTER_NOTIF(1, CENTER_VEHICLE_ENTER, 0, 0, "pass_key", CPID_VEHICLES, "0 0", _("^BGPress ^F2DROPFLAG%s^BG to enter/exit the vehicle"), "") \
+ MSG_CENTER_NOTIF(1, CENTER_VEHICLE_ENTER_GUNNER, 0, 0, "pass_key", CPID_VEHICLES, "0 0", _("^BGPress ^F2DROPFLAG%s^BG to enter the vehicle gunner"), "") \
+ MSG_CENTER_NOTIF(1, CENTER_VEHICLE_ENTER_STEAL, 0, 0, "pass_key", CPID_VEHICLES, "0 0", _("^BGPress ^F2DROPFLAG%s^BG to steal this vehicle"), "") \
+ MSG_CENTER_NOTIF(1, CENTER_VEHICLE_STEAL, 0, 0, "", CPID_VEHICLES_OTHER, "0 0", _("^F2The enemy is stealing one of your vehicles!\n^F4Stop them!"), "") \
+ MSG_CENTER_NOTIF(1, CENTER_VEHICLE_STEAL_SELF, 0, 0, "", CPID_VEHICLES_OTHER, "4 0", _("^F2You have stolen the enemy's vehicle, you are now visible on their radar!"), "") \
MSG_CENTER_NOTIF(1, CENTER_WEAPON_MINELAYER_LIMIT, 0, 1, "f1", NO_CPID, "0 0", _("^BGYou cannot place more than ^F2%s^BG mines at a time"), "")
#define MULTITEAM_MULTI2(default,prefix,anncepre,infopre,centerpre) \
, CPID_RACE_FINISHLAP
, CPID_TEAMCHANGE
, CPID_TIMEOUT
+, CPID_VEHICLES
+, CPID_VEHICLES_OTHER
// always last
, NOTIF_CPID_COUNT
};
--- /dev/null
- #ifdef VEHICLES_USE_ODE
- void(entity e, float physics_enabled) physics_enable = #540; // enable or disable physics on object
- void(entity e, vector force, vector force_pos) physics_addforce = #541; // apply a force from certain origin, length of force vector is power of force
- void(entity e, vector torque) physics_addtorque = #542; // add relative torque
- #endif // VEHICLES_USE_ODE
-
+#ifndef VEHICLES_DEF_H
+#define VEHICLES_DEF_H
+#ifdef SVQC
+
+#include "../server/tturrets/include/turrets_early.qh"
+#include "sv_vehicles.qh"
+
+// #define VEHICLES_USE_ODE
+
+// vehicle cvars
+float autocvar_g_vehicles;
+float autocvar_g_vehicles_enter;
+float autocvar_g_vehicles_enter_radius;
+float autocvar_g_vehicles_steal;
+float autocvar_g_vehicles_steal_show_waypoint;
+float autocvar_g_vehicles_crush_dmg;
+float autocvar_g_vehicles_crush_force;
+float autocvar_g_vehicles_delayspawn;
+float autocvar_g_vehicles_delayspawn_jitter;
+float autocvar_g_vehicles_allow_bots;
+float autocvar_g_vehicles_teams;
+float autocvar_g_vehicles_teleportable;
+float autocvar_g_vehicles_vortex_damagerate = 0.5;
+float autocvar_g_vehicles_machinegun_damagerate = 0.5;
+float autocvar_g_vehicles_rifle_damagerate = 0.75;
+float autocvar_g_vehicles_vaporizer_damagerate = 0.001;
+float autocvar_g_vehicles_tag_damagerate = 5;
+float autocvar_g_vehicles_weapon_damagerate = 1;
+
+// flags:
+.int vehicle_flags;
+
+// vehicle definitions
+.entity gun1;
+.entity gun2;
+.entity gun3;
+.entity vehicle_shieldent; /// Entity to disply the shild effect on damage
+.entity vehicle;
+.entity vehicle_viewport;
+.entity vehicle_hudmodel;
+.entity vehicle_controller;
+
+.entity gunner1;
+.entity gunner2;
+
+.float vehicle_health; /// If self is player this is 0..100 indicating precentage of health left on vehicle. If self is vehile, this is the real health value.
+.float vehicle_energy; /// If self is player this is 0..100 indicating precentage of energy left on vehicle. If self is vehile, this is the real energy value.
+.float vehicle_shield; /// If self is player this is 0..100 indicating precentage of shield left on vehicle. If self is vehile, this is the real shield value.
+
+.float vehicle_ammo1; /// If self is player this field's use depends on the individual vehile. If self is vehile, this is the real ammo1 value.
+.float vehicle_reload1; /// If self is player this field's use depends on the individual vehile. If self is vehile, this is the real reload1 value.
+.float vehicle_ammo2; /// If self is player this field's use depends on the individual vehile. If self is vehile, this is the real ammo2 value.
+.float vehicle_reload2; /// If self is player this field's use depends on the individual vehile. If self is vehile, this is the real reload2 value.
+
+.float sound_nexttime;
+const float VOL_VEHICLEENGINE = 1;
+
+const float SVC_SETVIEWPORT = 5; // Net.Protocol 0x05
+const float SVC_SETVIEWANGLES = 10; // Net.Protocol 0x0A
+const float SVC_UPDATEENTITY = 128; // Net.Protocol 0x80
+
+const float VHSF_NORMAL = 0;
+const float VHSF_FACTORY = 2;
+
+.int hud;
+.float dmg_time;
+
+.int volly_counter;
+
+const int MAX_AXH = 4;
+.entity AuxiliaryXhair[MAX_AXH];
+
+.entity wps_intruder;
+
+.entity lock_target;
+.float lock_strength;
+.float lock_time;
+.float lock_soundtime;
+const float DAMAGE_TARGETDRONE = 10;
+
+// vehicle functions
+.void(int _spawnflag) vehicle_spawn; /// Vehicles custom fucntion to be efecuted when vehicle (re)spawns
+.bool(int _imp) vehicles_impulse;
+.int vehicle_weapon2mode;
+.void(int exit_flags) vehicle_exit;
+.bool() vehicle_enter;
+const int VHEF_NORMAL = 0; /// User pressed exit key
+const int VHEF_EJECT = 1; /// User pressed exit key 3 times fast (not implemented) or vehile is dying
+const int VHEF_RELEASE = 2; /// Release ownership, client possibly allready dissconnected / went spec / changed team / used "kill" (not implemented)
+
+float force_fromtag_power;
+float force_fromtag_normpower;
+vector force_fromtag_origin;
+
+float vehicles_exit_running;
+
+// macros
+#define VEHICLE_UPDATE_PLAYER(ply,fld,vhname) \
+ ply.vehicle_##fld = (self.vehicle_##fld / autocvar_g_vehicle_##vhname##_##fld) * 100
+
+.float vehicle_enter_delay; // prevent players jumping to and from vehicles instantly
+
+void vehicles_exit(float eject);
+float vehicle_initialize(float vehicle_id, float nodrop);
+
+#endif
+
+#endif
#elif defined(SVQC)
#include "../dpdefs/progsdefs.qh"
#include "../dpdefs/dpextensions.qh"
- #include "vehicles/vehicle.qh"
+ #include "../common/vehicles/sv_vehicles.qh"
+ #include "../common/vehicles/vehicles.qh"
#include "antilag.qh"
#endif
vector antilag_takebackorigin(entity e, float t)
{
- float i0, i1;
-
- i0 = antilag_find(e, t);
- if(i0 < 0)
+ int i0 = antilag_find(e, t);
+ if (i0 < 0)
{
// IN THE PRESENT
if(e.antilag_takenback)
else
return e.origin;
}
- i1 = i0 + 1;
- if(i1 >= ANTILAG_MAX_ORIGINS)
+ int i1 = i0 + 1;
+ if (i1 >= ANTILAG_MAX_ORIGINS)
i1 = 0;
return lerpv(e.(antilag_times[i0]), e.(antilag_origins[i0]), e.(antilag_times[i1]), e.(antilag_origins[i1]), t);
void antilag_clear(entity e)
{
- float i;
-
antilag_restore(e);
- for(i = 0; i < ANTILAG_MAX_ORIGINS; ++i)
+ for (int i = 0; i < ANTILAG_MAX_ORIGINS; ++i)
{
e.(antilag_times[i]) = -2342;
e.(antilag_origins[i]) = e.origin;
+ #include "cl_client.qh"
+
#include "waypointsprites.qh"
+ #include "anticheat.qh"
#include "cl_impulse.qh"
#include "cl_player.qh"
#include "ent_cs.qh"
#include "teamplay.qh"
#include "playerdemo.qh"
#include "secret.qh"
+ #include "spawnpoints.qh"
+ #include "g_damage.qh"
+ #include "g_hook.qh"
+ #include "t_teleporters.qh"
+ #include "command/common.qh"
+ #include "cheats.qh"
+ #include "g_world.qh"
+ #include "race.qh"
+ #include "antilag.qh"
+ #include "campaign.qh"
+ #include "command/common.qh"
#include "bot/bot.qh"
#include "bot/navigation.qh"
-#include "vehicles/vehicle.qh"
++#include "../common/vehicles/sv_vehicles.qh"
+
#include "weapons/hitplot.qh"
#include "weapons/weaponsystem.qh"
#include "../common/net_notice.qh"
+ #include "../common/items/inventory.qh"
+
#include "../common/monsters/sv_monsters.qh"
#include "../warpzonelib/server.qh"
- float c1, c2, c3, c4;
void send_CSQC_teamnagger() {
WriteByte(MSG_BROADCAST, SVC_TEMPENTITY);
}
if(self.vehicle)
- vehicles_exit(VHEF_RELESE);
+ vehicles_exit(VHEF_RELEASE);
WaypointSprite_PlayerDead();
defaultskin = 0;
chmdl = false;
- if(autocvar_sv_defaultcharacter == 1)
+ if(autocvar_sv_defaultcharacter)
{
if(teamplay)
{
if(IS_PLAYER(self))
{
entity spot, oldself;
- float j;
accuracy_resend(self);
RemoveGrapplingHook(self); // Wazat's Grappling Hook
- if(self.vehicle)
- vehicles_exit(VHEF_RELESE);
-
self.classname = "player";
self.wasplayer = true;
self.iscreature = true;
target_voicescript_clear(self);
// reset fields the weapons may use
- for (j = WEP_FIRST; j <= WEP_LAST; ++j)
+ for (int j = WEP_FIRST; j <= WEP_LAST; ++j)
{
WEP_ACTION(j, WR_RESETPLAYER);
// all weapons must be fully loaded when we spawn
entity e = get_weaponinfo(j);
- if(e.spawnflags & WEP_FLAG_RELOADABLE) // prevent accessing undefined cvars
+ if (e.spawnflags & WEP_FLAG_RELOADABLE) // prevent accessing undefined cvars
self.(weapon_load[j]) = e.reloading_ammo;
}
.float ebouncefactor, ebouncestop; // electro's values
// TODO do we need all these fields, or should we stop autodetecting runtime
// changes and just have a console command to update this?
- float ClientInit_SendEntity(entity to, float sf)
+ float ClientInit_SendEntity(entity to, int sf)
{
WriteByte(MSG_ENTITY, ENT_CLIENT_INIT);
WriteByte(MSG_ENTITY, g_nexball_meter_period * 32);
{
if(self.vehicle)
{
- vehicles_exit(VHEF_RELESE);
+ vehicles_exit(VHEF_RELEASE);
if(!self.killindicator_teamchange)
{
self.vehicle_health = -1;
PlayerScore_Attach(self);
ClientData_Attach();
accuracy_init(self);
+ Inventory_new(self);
bot_clientconnect();
void ClientDisconnect (void)
{
if(self.vehicle)
- vehicles_exit(VHEF_RELESE);
+ vehicles_exit(VHEF_RELEASE);
if (!IS_CLIENT(self))
{
bot_relinkplayerlist();
accuracy_free(self);
+ Inventory_delete(self);
ClientData_Detach();
PlayerScore_Detach(self);
// if player rotted to death... die!
// check this outside above checks, as player may still be able to rot to death
if(self.health < 1)
+ {
+ if(self.vehicle)
+ vehicles_exit(VHEF_RELEASE);
self.event_damage(self, self, 1, DEATH_ROT, self.origin, '0 0 0');
+ }
if (!(self.items & IT_UNLIMITED_WEAPON_AMMO))
{
self.flags |= FL_CLIENT | FL_NOTARGET;
}
+void vehicles_enter (entity pl, entity veh);
void PlayerUseKey()
{
if (!IS_PLAYER(self))
if(self.vehicle)
{
- vehicles_exit(VHEF_NORMAL);
- return;
+ if(!gameover)
+ {
+ vehicles_exit(VHEF_NORMAL);
+ return;
+ }
+ }
+ else if(autocvar_g_vehicles_enter)
+ {
+ if(!self.frozen)
+ if(self.deadflag == DEAD_NO)
+ if(!gameover)
+ {
+ entity head, closest_target = world;
+ head = WarpZone_FindRadius(self.origin, autocvar_g_vehicles_enter_radius, TRUE);
+
+ while(head) // find the closest acceptable target to enter
+ {
+ if(head.vehicle_flags & VHF_ISVEHICLE)
+ if(head.deadflag == DEAD_NO)
+ if(!head.owner || ((head.vehicle_flags & VHF_MULTISLOT) && SAME_TEAM(head.owner, self)))
+ if(head.takedamage != DAMAGE_NO)
+ {
+ if(closest_target)
+ {
+ if(vlen(self.origin - head.origin) < vlen(self.origin - closest_target.origin))
+ { closest_target = head; }
+ }
+ else { closest_target = head; }
+ }
+
+ head = head.chain;
+ }
+
+ if(closest_target) { vehicles_enter(self, closest_target); return; }
+ }
}
// a use key was pressed; call handlers
*/
.float usekeypressed;
void() nexball_setstatus;
+.float last_vehiclecheck;
.int items_added;
void PlayerPreThink (void)
{
if(self.health < 1)
{
if(self.vehicle)
- vehicles_exit(VHEF_RELESE);
+ vehicles_exit(VHEF_RELEASE);
self.event_damage(self, self.frozen_by, 1, DEATH_NADE_ICE_FREEZE, self.origin, '0 0 0');
}
else if ( self.revive_progress <= 0 )
MUTATOR_CALLHOOK(PlayerPreThink);
+ if(autocvar_g_vehicles_enter)
+ if(time > self.last_vehiclecheck)
+ if(IS_PLAYER(self))
+ if(!gameover)
+ if(!self.frozen)
+ if(!self.vehicle)
+ if(self.deadflag == DEAD_NO)
+ {
+ entity veh;
+ for(veh = world; (veh = findflags(veh, vehicle_flags, VHF_ISVEHICLE)); )
+ if(vlen(veh.origin - self.origin) < autocvar_g_vehicles_enter_radius)
+ if(veh.deadflag == DEAD_NO)
+ if(veh.takedamage != DAMAGE_NO)
+ if((veh.vehicle_flags & VHF_MULTISLOT) && SAME_TEAM(veh.owner, self))
+ Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_VEHICLE_ENTER_GUNNER);
+ else if(!veh.owner)
+ if(!veh.team || SAME_TEAM(self, veh))
+ Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_VEHICLE_ENTER);
+ else if(autocvar_g_vehicles_steal)
+ Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_VEHICLE_ENTER_STEAL);
+
+ self.last_vehiclecheck = time + 1;
+ }
+
if(!self.cvar_cl_newusekeysupported) // FIXME remove this - it was a stupid idea to begin with, we can JUST use the button
{
if(self.BUTTON_USE && !self.usekeypressed)
+ #include "_all.qh"
#include "round_handler.qh"
#include "bot/waypoints.qh"
#include "weapons/throwing.qh"
-#include "vehicles/vehicle.qh"
+ #include "command/common.qh"
+ #include "cheats.qh"
+ #include "bot/navigation.qh"
+ #include "weapons/selection.qh"
+ #include "weapons/tracing.qh"
+ #include "weapons/weaponsystem.qh"
++#include "../common/vehicles/sv_vehicles.qh"
+ #include "waypointsprites.qh"
- #include "../common/weapons/weapons.qh"
+ #include "../common/weapons/all.qh"
/*
* Impulse map:
if (timeout_status == TIMEOUT_ACTIVE) //don't allow any impulses while the game is paused
return;
- if(self.vehicle)
- if(self.vehicle.deadflag == DEAD_NO)
- if(self.vehicle.vehicles_impulse)
- if(self.vehicle.vehicles_impulse(imp))
- return;
+ if(self.vehicle)
+ if(self.vehicle.deadflag == DEAD_NO)
+ if(self.vehicle.vehicles_impulse)
+ if(self.vehicle.vehicles_impulse(imp))
+ return;
if(CheatImpulse(imp))
{
}
else if(imp >= 10 && imp <= 20)
{
+ if(!self.vehicle)
if(self.deadflag == DEAD_NO)
{
switch(imp)
W_PreviousWeapon(1);
break;
case 20:
- if(!forbidWeaponUse()) { WEP_ACTION(self.weapon, WR_RELOAD); }
+ if(!forbidWeaponUse(self)) { WEP_ACTION(self.weapon, WR_RELOAD); }
break;
}
}
}
else if(imp >= 200 && imp <= 229)
{
+ if(!self.vehicle)
if(self.deadflag == DEAD_NO)
{
// custom order weapon cycling
- i = imp % 10;
+ int i = imp % 10;
m = (imp - (210 + i)); // <0 for prev, =0 for best, >0 for next
W_CycleWeapon(self.(cvar_cl_weaponpriorities[i]), m);
}
}
else if(imp >= 230 && imp <= 253)
{
+ if(!self.vehicle)
if(self.deadflag == DEAD_NO)
W_SwitchWeapon (imp - 230 + WEP_FIRST);
else
- #if defined(CSQC)
- #elif defined(MENUQC)
- #elif defined(SVQC)
- #include "../../dpdefs/progsdefs.qh"
- #include "../../dpdefs/dpextensions.qh"
- #include "../../warpzonelib/common.qh"
- #include "../../common/constants.qh"
- #include "../../common/teams.qh"
- #include "../../common/util.qh"
- #include "../../common/command/shared_defs.qh"
- #include "../../common/monsters/monsters.qh"
- #include "../../common/monsters/sv_monsters.qh"
- #include "../../common/monsters/spawn.qh"
- #include "../autocvars.qh"
- #include "../defs.qh"
- #include "../../common/notifications.qh"
- #include "../../common/deathtypes.qh"
- #include "../mutators/mutators_include.qh"
- #include "../../common/vehicles/sv_vehicles.qh"
- #include "../campaign.qh"
- #include "../../common/mapinfo.qh"
- #include "common.qh"
- #include "vote.qh"
- #include "cmd.qh"
- #include "../cheats.qh"
- #include "../scores.qh"
- #include "../ipban.qh"
+ #include "../../common/command/command.qh"
+ #include "cmd.qh"
+ #include "../_all.qh"
+
+ #include "common.qh"
+ #include "vote.qh"
+
+ #include "../campaign.qh"
+ #include "../cheats.qh"
+ #include "../cl_player.qh"
+ #include "../g_triggers.qh"
+ #include "../ipban.qh"
+ #include "../mapvoting.qh"
+ #include "../scores.qh"
+ #include "../teamplay.qh"
+
+ #include "../mutators/mutators_include.qh"
+
+ #ifdef SVQC
- #include "../vehicles/vehicle.qh"
++ #include "../../common/vehicles/sv_vehicles.qh"
#endif
+ #include "../../common/constants.qh"
+ #include "../../common/deathtypes.qh"
+ #include "../../common/mapinfo.qh"
+ #include "../../common/notifications.qh"
+ #include "../../common/teams.qh"
+ #include "../../common/util.qh"
+
+ #include "../../common/monsters/all.qh"
+ #include "../../common/monsters/spawn.qh"
+ #include "../../common/monsters/sv_monsters.qh"
+
+ #include "../../warpzonelib/common.qh"
+
+ void ClientKill_TeamChange (float targetteam); // 0 = don't change, -1 = auto, -2 = spec
+
// =========================================================
// Server side networked commands code, reworked by Samual
// Last updated: December 28th, 2011
}
}
+ void ClientCommand_physics(float request, float argc)
+ {
+ switch(request)
+ {
+ case CMD_REQUEST_COMMAND:
+ {
+ string command = strtolower(argv(1));
+
+ if(!autocvar_g_physics_clientselect)
+ {
+ sprint(self, "Client physics selection is currently disabled.\n");
+ return;
+ }
+
+ if(command == "list" || command == "help")
+ {
+ sprint(self, strcat("Available physics sets: \n\n", autocvar_g_physics_clientselect_options, " default\n"));
+ return;
+ }
+
+ if(Physics_Valid(command) || command == "default")
+ {
+ stuffcmd(self, strcat("\nseta cl_physics ", command, "\nsendcvar cl_physics\n"));
+ sprint(self, strcat("^2Physics set successfully changed to ^3", command, "\n"));
+ return;
+ }
+ }
+
+ default:
+ sprint(self, strcat("Current physics set: ^3", self.cvar_cl_physics, "\n"));
+ case CMD_REQUEST_USAGE:
+ {
+ sprint(self, "\nUsage:^3 cmd physics <physics>\n");
+ sprint(self, " See 'cmd physics list' for available physics sets.\n");
+ sprint(self, " Argument 'default' resets to standard physics.\n");
+ return;
+ }
+ }
+ }
+
void ClientCommand_ready(float request) // todo: anti-spam for toggling readyness
{
switch(request)
CLIENT_COMMAND("mobedit", ClientCommand_mobedit(request, arguments), "Edit your monster's properties") \
CLIENT_COMMAND("mobkill", ClientCommand_mobkill(request), "Kills your monster") \
CLIENT_COMMAND("mobspawn", ClientCommand_mobspawn(request, arguments), "Spawn monsters infront of yourself") \
+ CLIENT_COMMAND("physics", ClientCommand_physics(request, arguments), "Change physics set") \
CLIENT_COMMAND("ready", ClientCommand_ready(request), "Qualify as ready to end warmup stage (or restart server if allowed)") \
CLIENT_COMMAND("say", ClientCommand_say(request, arguments, command), "Print a message to chat to all players") \
CLIENT_COMMAND("say_team", ClientCommand_say_team(request, arguments, command), "Print a message to chat to all team mates") \
#include "g_damage.qh"
-
- #if defined(CSQC)
- #elif defined(MENUQC)
- #elif defined(SVQC)
- #include "../warpzonelib/common.qh"
- #include "../common/constants.qh"
- #include "../common/teams.qh"
- #include "../common/util.qh"
- #include "../common/weapons/weapons.qh"
- #include "weapons/accuracy.qh"
- #include "weapons/csqcprojectile.qh"
- #include "weapons/selection.qh"
- #include "t_items.qh"
- #include "autocvars.qh"
- #include "constants.qh"
- #include "defs.qh"
- #include "../common/notifications.qh"
- #include "../common/deathtypes.qh"
- #include "mutators/mutators_include.qh"
- #include "tturrets/include/turrets_early.qh"
- #include "../common/vehicles/sv_vehicles.qh"
- #include "../csqcmodellib/sv_model.qh"
- #include "../common/playerstats.qh"
- #include "g_hook.qh"
- #include "scores.qh"
- #include "spawnpoints.qh"
- #endif
-
- float Damage_DamageInfo_SendEntity(entity to, float sf)
+ #include "_all.qh"
+
+ #include "g_hook.qh"
+ #include "mutators/mutators_include.qh"
+ #include "scores.qh"
+ #include "waypointsprites.qh"
+ #include "spawnpoints.qh"
+ #include "tturrets/include/turrets_early.qh"
+ #include "t_items.qh"
-#include "vehicles/vehicle.qh"
++#include "../common/vehicles/sv_vehicles.qh"
+ #include "weapons/accuracy.qh"
+ #include "weapons/csqcprojectile.qh"
+ #include "weapons/selection.qh"
+ #include "../common/constants.qh"
+ #include "../common/deathtypes.qh"
+ #include "../common/notifications.qh"
+ #include "../common/playerstats.qh"
+ #include "../common/teams.qh"
+ #include "../common/util.qh"
+ #include "../common/weapons/all.qh"
+ #include "../csqcmodellib/sv_model.qh"
+ #include "../warpzonelib/common.qh"
+
+ float Damage_DamageInfo_SendEntity(entity to, int sf)
{
WriteByte(MSG_ENTITY, ENT_CLIENT_DAMAGEINFO);
WriteShort(MSG_ENTITY, self.projectiledeathtype);
return true;
}
- void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad, vector force, float deathtype, float bloodtype, entity dmgowner)
+ void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad, vector force, int deathtype, float bloodtype, entity dmgowner)
{
// TODO maybe call this from non-edgedamage too?
// TODO maybe make the client do the particle effects for the weapons and the impact sounds using this info?
PlayerTeamScore_AddScore(player, f);
}
- void GiveFrags (entity attacker, entity targ, float f, float deathtype)
+ void GiveFrags (entity attacker, entity targ, float f, int deathtype)
{
// TODO route through PlayerScores instead
if(gameover) return;
return s;
}
- void LogDeath(string mode, float deathtype, entity killer, entity killed)
+ void LogDeath(string mode, int deathtype, entity killer, entity killed)
{
string s;
if(!autocvar_sv_eventlog)
void Obituary_SpecialDeath(
entity notif_target,
float murder,
- float deathtype,
+ int deathtype,
string s1, string s2, string s3,
float f1, float f2, float f3)
{
float Obituary_WeaponDeath(
entity notif_target,
float murder,
- float deathtype,
+ int deathtype,
string s1, string s2, string s3,
float f1, float f2)
{
if(death_weapon)
{
w_deathtype = deathtype;
- float death_message = WEP_ACTION(death_weapon, ((murder) ? WR_KILLMESSAGE : WR_SUICIDEMESSAGE));
+ int death_message = WEP_ACTION(death_weapon, ((murder) ? WR_KILLMESSAGE : WR_SUICIDEMESSAGE));
w_deathtype = false;
- if(death_message)
+ if (death_message)
{
Send_Notification_WOCOVA(
NOTIF_ONE,
return false;
}
- void Obituary(entity attacker, entity inflictor, entity targ, float deathtype)
+ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype)
{
// Sanity check
if (!IS_PLAYER(targ)) { backtrace("Obituary called on non-player?!\n"); return; }
targ.iceblock = world;
}
- void Damage (entity targ, entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+ void Damage (entity targ, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
{
float mirrordamage;
float mirrorforce;
{
// exit the vehicle before killing (fixes a crash)
if(IS_PLAYER(targ) && targ.vehicle)
- vehicles_exit(VHEF_RELESE);
+ vehicles_exit(VHEF_RELEASE);
// These are ALWAYS lethal
// No damage modification here
}
}
- float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float inflictorselfdamage, float forceintensity, float deathtype, entity directhitentity)
+ float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float inflictorselfdamage, float forceintensity, int deathtype, entity directhitentity)
// Returns total damage applies to creatures
{
entity targ;
return total_damage_to_creatures;
}
- float RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, float deathtype, entity directhitentity)
+ float RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype, entity directhitentity)
{
return RadiusDamageForSource (inflictor, (inflictor.origin + (inflictor.mins + inflictor.maxs) * 0.5), inflictor.velocity, attacker, coredamage, edgedamage, rad, cantbe, mustbe, false, forceintensity, deathtype, directhitentity);
}
#include "../common/constants.qh"
#include "../common/teams.qh"
#include "../common/util.qh"
- #include "../common/weapons/weapons.qh"
+ #include "../common/weapons/all.qh"
#include "weapons/accuracy.qh"
#include "weapons/csqcprojectile.qh"
#include "weapons/selection.qh"
#include "../common/deathtypes.qh"
#include "mutators/mutators_include.qh"
#include "tturrets/include/turrets_early.qh"
- #include "vehicles/vehicle.qh"
+ #include "../common/vehicles/sv_vehicles.qh"
#include "../csqcmodellib/sv_model.qh"
#include "../common/playerstats.qh"
#include "g_hook.qh"
.float dmg_force;
.float dmg_radius;
- float Damage_DamageInfo_SendEntity(entity to, float sf);
+ float Damage_DamageInfo_SendEntity(entity to, int sf);
- void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad, vector force, float deathtype, float bloodtype, entity dmgowner);
+ void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad, vector force, int deathtype, float bloodtype, entity dmgowner);
float checkrules_firstblood;
// NOTE: f=0 means still count as a (positive) kill, but count no frags for it
void W_SwitchWeapon_Force(entity e, float w);
entity GiveFrags_randomweapons;
- void GiveFrags (entity attacker, entity targ, float f, float deathtype);
+ void GiveFrags (entity attacker, entity targ, float f, int deathtype);
string AppendItemcodes(string s, entity player);
- void LogDeath(string mode, float deathtype, entity killer, entity killed);
+ void LogDeath(string mode, int deathtype, entity killer, entity killed);
void Obituary_SpecialDeath(
entity notif_target,
float murder,
- float deathtype,
+ int deathtype,
string s1, string s2, string s3,
float f1, float f2, float f3);
float Obituary_WeaponDeath(
entity notif_target,
float murder,
- float deathtype,
+ int deathtype,
string s1, string s2, string s3,
float f1, float f2);
- void Obituary(entity attacker, entity inflictor, entity targ, float deathtype);
+ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype);
void Ice_Think();
entity damage_inflictor;
entity damage_attacker;
- void Damage (entity targ, entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force);
+ void Damage (entity targ, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force);
float RadiusDamage_running;
- float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float inflictorselfdamage, float forceintensity, float deathtype, entity directhitentity);
+ float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float inflictorselfdamage, float forceintensity, int deathtype, entity directhitentity);
// Returns total damage applies to creatures
- float RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, float deathtype, entity directhitentity);
+ float RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype, entity directhitentity);
.float fire_damagepersec;
.float fire_endtime;
- #if defined(CSQC)
- #elif defined(MENUQC)
- #elif defined(SVQC)
- #include "../dpdefs/progsdefs.qh"
- #include "../dpdefs/dpextensions.qh"
- #include "../warpzonelib/common.qh"
- #include "../warpzonelib/server.qh"
- #include "../common/constants.qh"
- #include "../common/util.qh"
- #include "../common/weapons/weapons.qh"
- #include "autocvars.qh"
- #include "constants.qh"
- #include "defs.qh"
- #include "../common/vehicles/sv_vehicles.qh"
- #include "command/common.qh"
- #include "g_hook.qh"
- #include "round_handler.qh"
- #endif
+ #include "g_hook.qh"
+ #include "_all.qh"
+
+ #include "weapons/common.qh"
+ #include "weapons/weaponsystem.qh"
+ #include "weapons/selection.qh"
+ #include "weapons/tracing.qh"
+ #include "cl_player.qh"
+ #include "t_teleporters.qh"
+ #include "command/common.qh"
+ #include "round_handler.qh"
-#include "vehicles/vehicle.qh"
++#include "../common/vehicles/sv_vehicles.qh"
+ #include "../common/constants.qh"
+ #include "../common/util.qh"
+ #include "../common/weapons/all.qh"
+ #include "../warpzonelib/common.qh"
+ #include "../warpzonelib/server.qh"
/*============================================
}
.vector hook_start, hook_end;
- float GrapplingHookSend(entity to, float sf)
+ float GrapplingHookSend(entity to, int sf)
{
WriteByte(MSG_ENTITY, ENT_CLIENT_HOOK);
sf = sf & 0x7F;
void GrapplingHookThink()
{
- float spd, dist, minlength, pullspeed, ropestretch, ropeairfriction, rubberforce, newlength, rubberforce_overstretch, s;
+ float spd, dist, minlength, pullspeed, ropestretch, ropeairfriction, rubberforce, newlength, rubberforce_overstretch;
vector dir, org, end, v0, dv, v, myorg, vs;
if(self.realowner.hook != self) // how did that happen?
{
self.nextthink = time;
- s = self.realowner.cvar_cl_gunalign;
+ int s = self.realowner.cvar_cl_gunalign;
if(s != 1 && s != 2 && s != 4)
s = 3; // default value
--s;
//self.realowner.disableclientprediction = true;
}
- void GrapplingHook_Damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+ void GrapplingHook_Damage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
{
if(self.health <= 0)
return;
{
entity missile;
vector org;
- float s;
vector vs;
- if(forbidWeaponUse()) return;
+ if(forbidWeaponUse(self)) return;
if(self.vehicle) return;
makevectors(self.v_angle);
- s = self.cvar_cl_gunalign;
+ int s = self.cvar_cl_gunalign;
if(s != 1 && s != 2 && s != 4)
s = 3; // default value
--s;
#include "g_world.qh"
-
+ #include "_all.qh"
+
+ #include "anticheat.qh"
+ #include "antilag.qh"
+ #include "bot/bot.qh"
+ #include "campaign.qh"
+ #include "cheats.qh"
+ #include "cl_client.qh"
+ #include "command/common.qh"
+ #include "command/getreplies.qh"
+ #include "command/sv_cmd.qh"
+ #include "command/vote.qh"
+ #include "g_hook.qh"
+ #include "ipban.qh"
+ #include "mapvoting.qh"
+ #include "mutators/mutators_include.qh"
+ #include "race.qh"
+ #include "scores.qh"
+ #include "secret.qh"
+ #include "teamplay.qh"
+ #include "waypointsprites.qh"
+ #include "weapons/weaponstats.qh"
#include "../common/buffs.qh"
-
- #if defined(CSQC)
- #elif defined(MENUQC)
- #elif defined(SVQC)
- #include "../common/constants.qh"
- #include "../common/stats.qh"
- #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"
- #include "constants.qh"
- #include "defs.qh"
- #include "../common/notifications.qh"
- #include "mutators/mutators_include.qh"
- #include "campaign.qh"
- #include "../common/mapinfo.qh"
- #include "command/common.qh"
- #include "command/vote.qh"
- #include "command/getreplies.qh"
- #include "command/sv_cmd.qh"
- #include "anticheat.qh"
- #include "cheats.qh"
- #include "../common/playerstats.qh"
- #include "g_hook.qh"
- #include "scores.qh"
- #include "mapvoting.qh"
- #include "ipban.qh"
- #include "race.qh"
- #include "antilag.qh"
- #include "secret.qh"
- #endif
+ #include "../common/constants.qh"
+ #include "../common/deathtypes.qh"
+ #include "../common/mapinfo.qh"
+ #include "../common/monsters/all.qh"
+ #include "../common/monsters/sv_monsters.qh"
++#include "../common/vehicles/vehicles.qh"
+ #include "../common/notifications.qh"
+ #include "../common/playerstats.qh"
+ #include "../common/stats.qh"
+ #include "../common/teams.qh"
+ #include "../common/util.qh"
+ #include "../common/items/all.qh"
+ #include "../common/weapons/all.qh"
const float LATENCY_THINKRATE = 10;
.float latency_sum;
float world_initialized;
string GetGametype();
- void GotoNextMap(float reinit);
void ShuffleMaplist();
- float(float reinit) DoNextMapOverride;
void SetDefaultAlpha()
{
BADCVAR("g_configversion");
BADCVAR("g_maplist_index");
BADCVAR("halflifebsp");
+ BADCVAR("sv_mapformat_is_quake2");
+ BADCVAR("sv_mapformat_is_quake3");
BADPREFIX("sv_world");
// client
BADCVAR("g_domination_default_teams");
BADCVAR("g_freezetag");
BADCVAR("g_freezetag_teams");
+ BADCVAR("g_invasion_teams");
BADCVAR("g_keepaway");
BADCVAR("g_keyhunt");
BADCVAR("g_keyhunt_teams");
BADCVAR("g_ca_teams_override");
BADCVAR("g_ctf_ignore_frags");
BADCVAR("g_domination_point_limit");
+ BADCVAR("g_domination_teams_override");
BADCVAR("g_freezetag_teams_override");
BADCVAR("g_friendlyfire");
BADCVAR("g_fullbrightitems");
BADCVAR("g_nexball_goallimit");
BADCVAR("g_powerups");
BADCVAR("g_start_delay");
+ BADCVAR("g_tdm_teams_override");
BADCVAR("g_warmup");
BADCVAR("g_weapon_stay"); BADPRESUFFIX("g_", "_weapon_stay");
BADCVAR("hostname");
}
entity randomseed;
- float RandomSeed_Send(entity to, float sf)
+ float RandomSeed_Send(entity to, int sf)
{
WriteByte(MSG_ENTITY, ENT_CLIENT_RANDOMSEED);
WriteShort(MSG_ENTITY, self.cnt);
// 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(RegisterItems);
CALL_ACCUMULATED_FUNCTION(RegisterGametypes);
CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
void WeaponStats_Shutdown();
void spawnfunc_worldspawn (void)
{
- float fd, l, i, j, n;
+ float fd, l, j, n;
string s;
cvar = cvar_normal;
// 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(RegisterItems);
CALL_ACCUMULATED_FUNCTION(RegisterGametypes);
CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
// character set: ASCII 33-126 without the following characters: : ; ' " \ $
if(autocvar_sv_eventlog)
{
- s = sprintf("%d.%s.%06d", ftos(autocvar_sv_eventlog_files_counter), strftime(false, "%s"), floor(random() * 1000000));
+ s = sprintf("%d.%s.%06d", itos(autocvar_sv_eventlog_files_counter), strftime(false, "%s"), floor(random() * 1000000));
matchid = strzone(s);
GameLogEcho(strcat(":gamestart:", GetGametype(), "_", GetMapname(), ":", s));
addstat(STAT_MOVEVARS_AIRACCEL_QW, AS_FLOAT, stat_sv_airaccel_qw);
addstat(STAT_MOVEVARS_AIRSTRAFEACCEL_QW, AS_FLOAT, stat_sv_airstrafeaccel_qw);
+ // new properties
+ addstat(STAT_MOVEVARS_JUMPVELOCITY, AS_FLOAT, stat_sv_jumpvelocity);
+ addstat(STAT_MOVEVARS_AIRACCEL_QW_STRETCHFACTOR, AS_FLOAT, stat_sv_airaccel_qw_stretchfactor);
+ addstat(STAT_MOVEVARS_MAXAIRSTRAFESPEED, AS_FLOAT, stat_sv_maxairstrafespeed);
+ addstat(STAT_MOVEVARS_MAXAIRSPEED, AS_FLOAT, stat_sv_maxairspeed);
+ addstat(STAT_MOVEVARS_AIRSTRAFEACCELERATE, AS_FLOAT, stat_sv_airstrafeaccelerate);
+ addstat(STAT_MOVEVARS_WARSOWBUNNY_TURNACCEL, AS_FLOAT, stat_sv_warsowbunny_turnaccel);
+ addstat(STAT_MOVEVARS_AIRACCEL_SIDEWAYS_FRICTION, AS_FLOAT, stat_sv_airaccel_sideways_friction);
+ addstat(STAT_MOVEVARS_AIRCONTROL, AS_FLOAT, stat_sv_aircontrol);
+ addstat(STAT_MOVEVARS_AIRCONTROL_POWER, AS_FLOAT, stat_sv_aircontrol_power);
+ addstat(STAT_MOVEVARS_AIRCONTROL_PENALTY, AS_FLOAT, stat_sv_aircontrol_penalty);
+ addstat(STAT_MOVEVARS_WARSOWBUNNY_AIRFORWARDACCEL, AS_FLOAT, stat_sv_warsowbunny_airforwardaccel);
+ addstat(STAT_MOVEVARS_WARSOWBUNNY_TOPSPEED, AS_FLOAT, stat_sv_warsowbunny_topspeed);
+ addstat(STAT_MOVEVARS_WARSOWBUNNY_ACCEL, AS_FLOAT, stat_sv_warsowbunny_accel);
+ addstat(STAT_MOVEVARS_WARSOWBUNNY_BACKTOSIDERATIO, AS_FLOAT, stat_sv_warsowbunny_backtosideratio);
+ addstat(STAT_MOVEVARS_FRICTION, AS_FLOAT, stat_sv_friction);
+ addstat(STAT_MOVEVARS_ACCELERATE, AS_FLOAT, stat_sv_accelerate);
+ addstat(STAT_MOVEVARS_STOPSPEED, AS_FLOAT, stat_sv_stopspeed);
+ addstat(STAT_MOVEVARS_AIRACCELERATE, AS_FLOAT, stat_sv_airaccelerate);
+ addstat(STAT_MOVEVARS_AIRSTOPACCELERATE, AS_FLOAT, stat_sv_airstopaccelerate);
+
// secrets
addstat(STAT_SECRETS_TOTAL, AS_FLOAT, stat_secrets_total);
addstat(STAT_SECRETS_FOUND, AS_FLOAT, stat_secrets_found);
maplist_reply = strzone(getmaplist());
lsmaps_reply = strzone(getlsmaps());
monsterlist_reply = strzone(getmonsterlist());
- for(i = 0; i < 10; ++i)
+ for(int i = 0; i < 10; ++i)
{
s = getrecords(i);
if (s)
{
s = "";
n = tokenize_console(cvar_string("sv_curl_serverpackages"));
- for(i = 0; i < n; ++i)
+ for(int i = 0; i < n; ++i)
if(substring(argv(i), -18, -1) != "-serverpackage.txt")
if(substring(argv(i), -14, -1) != ".serverpackage") // OLD legacy
s = strcat(s, " ", argv(i));
if(fd >= 0)
{
j = search_getsize(fd);
- for(i = 0; i < j; ++i)
+ for(int i = 0; i < j; ++i)
s = strcat(s, " ", search_getfilename(fd, i));
search_end(fd);
}
if(fd >= 0)
{
j = search_getsize(fd);
- for(i = 0; i < j; ++i)
+ for(int i = 0; i < j; ++i)
s = strcat(s, " ", search_getfilename(fd, i));
search_end(fd);
}
{
entity head;
FOR_EACH_PLAYER(head)
- head.winning = (head.field == value);
+ head.winning = (head.(field) == value);
}
// set the .winning flag for those players with a given field value
{
entity head;
FOR_EACH_PLAYER(head)
- if(head.field == value)
+ if (head.(field) == value)
head.winning = 1;
}
if(have_team_spawns <= 0)
return WINNING_NO;
- if(autocvar_g_spawn_useallspawns <= 0)
+ if(!autocvar_g_spawn_useallspawns)
return WINNING_NO;
if(!some_spawn_has_been_used)
Exit deathmatch games upon conditions
============
*/
- void ReadyRestart();
void CheckRules_World()
{
float timelimit;
+ #include "gamemode_assault.qh"
+ #include "../_all.qh"
+
+ #include "gamemode.qh"
+
+ .entity sprite;
+
// random functions
void assault_objective_use()
{
// trigger new round
// reset objectives, toggle spawnpoints, reset triggers, ...
+void vehicles_clearreturn(entity veh);
+void vehicles_spawn();
void assault_new_round()
{
+ entity oldself;
+ //bprint("ASSAULT: new round\n");
+
+ oldself = self;
+ // Eject players from vehicles
+ FOR_EACH_PLAYER(self)
+ {
+ if(self.vehicle)
+ vehicles_exit(VHEF_RELEASE);
+ }
+
+ self = findchainflags(vehicle_flags, VHF_ISVEHICLE);
+ while(self)
+ {
+ vehicles_clearreturn(self);
+ vehicles_spawn();
+ self = self.chain;
+ }
+
+ self = oldself;
+
// up round counter
self.winning = self.winning + 1;
-#include "../vehicles/vehicle.qh"
+ #include "gamemode_ctf.qh"
+ #include "../_all.qh"
+
+ #include "gamemode.qh"
+
+ #ifdef SVQC
++#include "../../common/vehicles/sv_vehicles.qh"
+ #endif
+
+ #include "../../warpzonelib/common.qh"
+ #include "../../warpzonelib/mathlib.qh"
+
// ================================================================
// Official capture the flag game mode coding, reworked by Samual
// Last updated: September, 2012
}
}
- void ctf_FlagDamage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+ void ctf_FlagDamage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
{
if(ITEM_DAMAGE_NEEDKILL(deathtype))
{
+ #include "mutator_nades.qh"
+ #include "../_all.qh"
+
+ #include "mutator.qh"
+
+ #include "gamemode_keyhunt.qh"
+ #include "gamemode_freezetag.qh"
+ #include "../../common/nades.qh"
+ #include "../../common/monsters/spawn.qh"
+ #include "../../common/monsters/sv_monsters.qh"
+
+ .float lifetime;
+
.entity nade_spawnloc;
void nade_timer_think()
void nade_boom()
{
string expef;
- float nade_blast = 1;
+ bool nade_blast = true;
switch ( self.nade_type )
{
expef = "explosion_medium";
break;
case NADE_TYPE_ICE:
- nade_blast = 0;
+ nade_blast = false;
expef = "electro_combo"; // hookbomb_explode electro_combo bigplasma_impact
break;
case NADE_TYPE_TRANSLOCATE:
- nade_blast = 0;
+ nade_blast = false;
expef = "";
break;
case NADE_TYPE_MONSTER:
case NADE_TYPE_SPAWN:
- nade_blast = 0;
+ nade_blast = false;
switch(self.realowner.team)
{
case NUM_TEAM_1: expef = "spawn_event_red"; break;
}
break;
case NADE_TYPE_HEAL:
- nade_blast = 0;
+ nade_blast = false;
expef = "spawn_event_red";
break;
self.nextthink = max(self.wait, time);
}
- void nade_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+ void nade_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
{
if(ITEM_DAMAGE_NEEDKILL(deathtype))
{
if (!autocvar_g_nades)
return false; // allow turning them off mid match
- if(forbidWeaponUse())
+ if(forbidWeaponUse(self))
return false;
if (!IS_PLAYER(self))
- void ok_DecreaseCharge(entity ent, float wep)
+ #include "mutator_overkill.qh"
+ #include "../_all.qh"
+
+ #include "mutator.qh"
+
+ void W_Blaster_Attack(float, float, float, float, float, float, float, float, float, float);
+ void spawnfunc_weapon_hmg();
+ void spawnfunc_weapon_rpc();
+
+ void ok_DecreaseCharge(entity ent, int wep)
{
if(!ent.ok_use_ammocharge) return;
ent.ammo_charge[wep] -= max(0, cvar(sprintf("g_overkill_ammo_decharge_%s", wepent.netname)));
}
- void ok_IncreaseCharge(entity ent, float wep)
+ void ok_IncreaseCharge(entity ent, int wep)
{
entity wepent = get_weaponinfo(wep);
ent.ammo_charge[wep] = min(autocvar_g_overkill_ammo_charge_limit, ent.ammo_charge[wep] + cvar(sprintf("g_overkill_ammo_charge_rate_%s", wepent.netname)) * frametime / W_TICSPERFRAME);
}
- float ok_CheckWeaponCharge(entity ent, float wep)
+ float ok_CheckWeaponCharge(entity ent, int wep)
{
if(!ent.ok_use_ammocharge) return true;
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();
{
if(autocvar_g_overkill_ammo_charge)
{
- float i;
-
- for(i = WEP_FIRST; i <= WEP_LAST; ++i)
+ for(int i = WEP_FIRST; i <= WEP_LAST; ++i)
self.ammo_charge[i] = autocvar_g_overkill_ammo_charge_limit;
self.ok_use_ammocharge = 1;
#include "../../common/command/markup.qh"
#include "../../common/command/rpn.qh"
#include "../../common/command/generic.qh"
- #include "../../common/command/shared_defs.qh"
+ #include "../../common/command/command.qh"
#include "../../common/net_notice.qh"
#include "../../common/animdecide.qh"
- #include "../../common/monsters/monsters.qh"
+ #include "../../common/monsters/all.qh"
#include "../../common/monsters/sv_monsters.qh"
#include "../../common/monsters/spawn.qh"
#include "../../common/weapons/config.qh"
- #include "../../common/weapons/weapons.qh"
+ #include "../../common/weapons/all.qh"
#include "../weapons/accuracy.qh"
#include "../weapons/common.qh"
#include "../weapons/csqcprojectile.qh"
#include "../../common/deathtypes.qh"
#include "mutators_include.qh"
#include "../tturrets/include/turrets_early.qh"
- #include "../vehicles/vehicle.qh"
+ #include "../../common/vehicles/sv_vehicles.qh"
#include "../campaign.qh"
#include "../../common/campaign_common.qh"
#include "../../common/mapinfo.qh"
#include "../secret.qh"
#include "../pathlib/pathlib.qh"
#include "../tturrets/include/turrets.qh"
- #include "../vehicles/all.qh"
#endif
#include "base.qc"
- #if defined(CSQC)
- #elif defined(MENUQC)
- #elif defined(SVQC)
- #include "../dpdefs/progsdefs.qh"
- #include "../dpdefs/dpextensions.qh"
- #include "../warpzonelib/anglestransform.qh"
- #include "../warpzonelib/util_server.qh"
- #include "../common/constants.qh"
- #include "../common/util.qh"
- #include "../common/weapons/weapons.qh"
- #include "autocvars.qh"
- #include "defs.qh"
- #include "../common/notifications.qh"
- #include "../common/deathtypes.qh"
- #include "mutators/mutators_include.qh"
- #include "../csqcmodellib/sv_model.qh"
- #include "portals.qh"
- #include "g_hook.qh"
- #endif
+ #include "portals.qh"
+ #include "_all.qh"
+
+ #include "g_hook.qh"
+ #include "g_subs.qh"
+ #include "mutators/mutators_include.qh"
+ #include "t_teleporters.qh"
+ #include "../common/constants.qh"
+ #include "../common/deathtypes.qh"
+ #include "../common/notifications.qh"
+ #include "../common/util.qh"
+ #include "../common/weapons/all.qh"
+ #include "../csqcmodellib/sv_model.qh"
+ #include "../warpzonelib/anglestransform.qh"
+ #include "../warpzonelib/util_server.qh"
#define PORTALS_ARE_NOT_SOLID
if(other.classname == "grapplinghook")
return; // handled by think
+ if(!autocvar_g_vehicles_teleportable)
+ if(other.vehicle_flags & VHF_ISVEHICLE)
+ return; // no teleporting vehicles?
+
if(!self.enemy)
error("Portal_Touch called for a broken portal\n");
}
}
- void Portal_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+ void Portal_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
{
if(deathtype == DEATH_TELEFRAG)
return;
anticheat.qc
antilag.qc
- // assault.qc
campaign.qc
cheats.qc
cl_client.qc
cl_physics.qc
cl_player.qc
csqceffects.qc
- // ctf.qc
- // domination.qc
ent_cs.qc
func_breakable.qc
g_casings.qc
g_damage.qc
g_hook.qc
+ // g_lights.qc // TODO: was never used
g_models.qc
g_subs.qc
g_tetris.qc
item_key.qc
mapvoting.qc
miscfunctions.qc
- // mode_onslaught.qc
movelib.qc
- // nexball.qc
+ // pathlib.qc // TODO: was never used. Seems to duplicate `pathlib/`
playerdemo.qc
portals.qc
race.qc
round_handler.qc
- // runematch.qc
scores.qc
scores_rules.qc
secret.qc
t_items.qc
t_jumppads.qc
t_plats.qc
- t_quake3.qc
t_quake.qc
+ t_quake3.qc
t_swamp.qc
t_teleporters.qc
waypointsprites.qc
+ bot/aim.qc
bot/bot.qc
+ bot/navigation.qc
+ bot/scripting.qc
+ bot/waypoints.qc
+
+ bot/havocbot/havocbot.qc
+ bot/havocbot/role_keyhunt.qc
+ bot/havocbot/role_onslaught.qc
+ bot/havocbot/roles.qc
- command/banning.qc
- command/cmd.qc
- command/common.qc
- command/getreplies.qc
- command/radarmap.qc
- command/sv_cmd.qc
- command/vote.qc
+ command/all.qc
mutators/mutators_include.qc
mutators/mutators.qc
-vehicles/all.qc
-
+ pathlib/costs.qc
+ pathlib/expandnode.qc
+ pathlib/main.qc
+ pathlib/movenode.qc
+ pathlib/path_waypoint.qc
+ pathlib/utility.qc
+
weapons/accuracy.qc
weapons/common.qc
weapons/csqcprojectile.qc // TODO
../common/buffs.qc
../common/campaign_file.qc
../common/campaign_setup.qc
- ../common/command/generic.qc
- ../common/command/markup.qc
- ../common/command/rpn.qc
../common/mapinfo.qc
- ../common/monsters/monsters.qc
+ ../common/monsters/all.qc
../common/monsters/spawn.qc
../common/monsters/sv_monsters.qc
../common/nades.qc
../common/test.qc
../common/urllib.qc
../common/util.qc
+../common/vehicles/vehicles_include.qc
+
+ ../common/items/all.qc
+
../common/weapons/config.qc
- ../common/weapons/weapons.qc // TODO
+ ../common/weapons/all.qc // TODO
../csqcmodellib/sv_model.qc
- #if defined(CSQC)
- #elif defined(MENUQC)
- #elif defined(SVQC)
- #include "../dpdefs/progsdefs.qh"
- #include "../dpdefs/dpextensions.qh"
- #include "../warpzonelib/common.qh"
- #include "../warpzonelib/server.qh"
- #include "../common/constants.qh"
- #include "../common/util.qh"
- #include "../common/weapons/weapons.qh"
- #include "weapons/csqcprojectile.qh"
- #include "autocvars.qh"
- #include "constants.qh"
- #include "defs.qh"
- #include "../common/deathtypes.qh"
- #include "mutators/mutators_include.qh"
- #include "../common/vehicles/sv_vehicles.qh"
- #include "../common/mapinfo.qh"
- #include "command/common.qh"
- #include "../csqcmodellib/sv_model.qh"
- #include "anticheat.qh"
- #include "g_hook.qh"
- #endif
+ #include "_all.qh"
+
+ #include "anticheat.qh"
+ #include "g_hook.qh"
+ #include "g_world.qh"
+
+ #include "bot/bot.qh"
+ #include "bot/waypoints.qh"
+
+ #include "command/common.qh"
+
+ #include "mutators/mutators_include.qh"
-#include "vehicles/vehicle.qh"
+ #include "weapons/csqcprojectile.qh"
+
+ #include "../common/constants.qh"
+ #include "../common/deathtypes.qh"
+ #include "../common/mapinfo.qh"
+ #include "../common/util.qh"
+
++#include "../common/vehicles/sv_vehicles.qh"
+ #include "../common/weapons/all.qh"
+
+ #include "../csqcmodellib/sv_model.qh"
+
+ #include "../warpzonelib/common.qh"
+ #include "../warpzonelib/server.qh"
+
+ .float lastground;
void CreatureFrame (void)
{
- #if defined(CSQC)
- #elif defined(MENUQC)
- #elif defined(SVQC)
- #include "../dpdefs/progsdefs.qh"
- #include "../warpzonelib/util_server.qh"
- #include "defs.qh"
- #include "../common/vehicles/sv_vehicles.qh"
- #endif
+ #include "_all.qh"
+
+ #include "../warpzonelib/util_server.qh"
-#include "vehicles/vehicle.qh"
++#include "../common/vehicles/sv_vehicles.qh"
+
+ .float ladder_time;
+ .entity ladder_entity;
.float roomtype;
.float radius;
#include "t_teleporters.qh"
+ #include "_all.qh"
- #if defined(CSQC)
- #elif defined(MENUQC)
- #elif defined(SVQC)
- #include "../warpzonelib/common.qh"
- #include "../warpzonelib/util_server.qh"
- #include "../warpzonelib/server.qh"
- #include "../common/constants.qh"
- #include "../common/util.qh"
- #include "weapons/csqcprojectile.qh"
- #include "autocvars.qh"
- #include "constants.qh"
- #include "defs.qh"
- #include "../common/deathtypes.qh"
- #include "tturrets/include/turrets_early.qh"
- #include "../common/vehicles/sv_vehicles.qh"
- #include "../common/mapinfo.qh"
- #include "anticheat.qh"
- #endif
+ #include "anticheat.qh"
+ #include "cl_player.qh"
+ #include "g_hook.qh"
+ #include "bot/waypoints.qh"
+ #include "tturrets/include/turrets_early.qh"
-#include "vehicles/vehicle.qh"
+ #include "weapons/csqcprojectile.qh"
+ #include "../common/constants.qh"
+ #include "../common/deathtypes.qh"
+ #include "../common/mapinfo.qh"
+ #include "../common/util.qh"
++#include "../common/vehicles/sv_vehicles.qh"
+ #include "../warpzonelib/common.qh"
+ #include "../warpzonelib/server.qh"
+ #include "../warpzonelib/util_server.qh"
+
+ .float lastteleporttime;
void trigger_teleport_use()
{
- #if defined(CSQC)
- #elif defined(MENUQC)
- #elif defined(SVQC)
- #include "../../dpdefs/progsdefs.qh"
- #include "../../dpdefs/dpextensions.qh"
- #include "../../common/constants.qh"
- #include "../../common/util.qh"
- #include "../../common/weapons/weapons.qh"
- #include "selection.qh"
- #include "weaponsystem.qh"
- #include "../t_items.qh"
- #include "../autocvars.qh"
- #include "../defs.qh"
- #endif
+ #include "selection.qh"
+ #include "../_all.qh"
+
+ #include "weaponsystem.qh"
+ #include "../t_items.qh"
+ #include "../waypointsprites.qh"
+ #include "../../common/constants.qh"
+ #include "../../common/util.qh"
+ #include "../../common/weapons/all.qh"
// switch between weapons
void Send_WeaponComplain(entity e, float wpn, float type)
else
self.selectweapon = imp; // update selectweapon ANYWAY
}
- else if(!forbidWeaponUse()) { WEP_ACTION(self.weapon, WR_RELOAD); }
+ else if(!forbidWeaponUse(self)) { WEP_ACTION(self.weapon, WR_RELOAD); }
}
void W_CycleWeapon(string weaponorder, float dir)
- #if defined(CSQC)
- #elif defined(MENUQC)
- #elif defined(SVQC)
- #include "../../dpdefs/progsdefs.qh"
- #include "../../dpdefs/dpextensions.qh"
- #include "../../common/constants.qh"
- #include "../../common/util.qh"
- #include "../../common/animdecide.qh"
- #include "../../common/monsters/monsters.qh"
- #include "../../common/weapons/weapons.qh"
- #include "weaponsystem.qh"
- #include "../t_items.qh"
- #include "../autocvars.qh"
- #include "../defs.qh"
- #include "../../common/notifications.qh"
- #include "../mutators/mutators_include.qh"
- #include "../command/common.qh"
- #include "../../csqcmodellib/sv_model.qh"
- #include "../round_handler.qh"
- #endif
+ #include "weaponsystem.qh"
+ #include "../_all.qh"
+
+ #include "selection.qh"
+
+ #include "../command/common.qh"
+ #include "../mutators/mutators_include.qh"
+ #include "../round_handler.qh"
+ #include "../t_items.qh"
+ #include "../../common/animdecide.qh"
+ #include "../../common/constants.qh"
+ #include "../../common/monsters/all.qh"
+ #include "../../common/notifications.qh"
+ #include "../../common/util.qh"
+ #include "../../common/weapons/all.qh"
+ #include "../../csqcmodellib/sv_model.qh"
/*
===========================================================================
}
}
-float forbidWeaponUse()
+float forbidWeaponUse(entity player)
{
if(time < game_starttime && !autocvar_sv_ready_restart_after_countdown)
return 1;
if(round_handler_IsActive() && !round_handler_IsRoundStarted())
return 1;
- if(self.player_blocked)
+ if(player.player_blocked)
return 1;
- if(self.frozen)
+ if(player.frozen)
return 1;
- if(self.weapon_blocked)
+ if(player.weapon_blocked)
return 1;
return 0;
}
if (!self.weaponentity || self.health < 1)
return; // Dead player can't use weapons and injure impulse commands
- if(forbidWeaponUse())
+ if(forbidWeaponUse(self))
if(self.weaponentity.state != WS_CLEAR)
{
w_ready();