Lint
authorTimePath <andrew.hardaker1995@gmail.com>
Wed, 9 Sep 2015 11:56:47 +0000 (21:56 +1000)
committerGitLab <gitlab@gitlab.com>
Mon, 21 Sep 2015 06:30:27 +0000 (06:30 +0000)
28 files changed:
qcsrc/client/progs.inc [new file with mode: 0644]
qcsrc/client/progs.src
qcsrc/client/weapons/projectile.qc
qcsrc/common/buffs.qh
qcsrc/common/effects.qh
qcsrc/common/mutators/base.qh
qcsrc/common/nades.qh
qcsrc/common/physics.qc
qcsrc/common/triggers/func/breakable.qc
qcsrc/common/triggers/subs.qc
qcsrc/common/triggers/target/speaker.qc
qcsrc/common/turrets/config.qh
qcsrc/common/turrets/turrets.qh
qcsrc/common/util-pre.qh
qcsrc/common/vehicles/all.qc
qcsrc/common/vehicles/all.qh
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/weapons/weapon/porto.qc
qcsrc/lib/Accumulate.qh
qcsrc/lib/Nil.qh
qcsrc/lib/OO.qh
qcsrc/menu/progs.inc [new file with mode: 0644]
qcsrc/menu/progs.src
qcsrc/server/cl_player.qc
qcsrc/server/mutators/gamemode_ctf.qc
qcsrc/server/mutators/mutator_buffs.qc
qcsrc/server/progs.inc [new file with mode: 0644]
qcsrc/server/progs.src

diff --git a/qcsrc/client/progs.inc b/qcsrc/client/progs.inc
new file mode 100644 (file)
index 0000000..b46a371
--- /dev/null
@@ -0,0 +1,77 @@
+#include "../common/util-pre.qh"
+#include "../dpdefs/csprogsdefs.qh"
+#include "../common/util-post.qh"
+
+#include "../lib/_all.inc"
+
+#include "announcer.qc"
+#include "bgmscript.qc"
+#include "controlpoint.qc"
+#include "csqcmodel_hooks.qc"
+#include "damage.qc"
+#include "effects.qc"
+#include "generator.qc"
+#include "gibs.qc"
+#include "hook.qc"
+#include "hud.qc"
+#include "hud_config.qc"
+#include "main.qc"
+#include "mapvoting.qc"
+#include "miscfunctions.qc"
+#include "modeleffects.qc"
+#include "movelib.qc"
+#include "particles.qc"
+#include "player_skeleton.qc"
+#include "rubble.qc"
+#include "scoreboard.qc"
+#include "shownames.qc"
+#include "teamradar.qc"
+#include "tuba.qc"
+#include "t_items.qc"
+#include "view.qc"
+#include "wall.qc"
+
+#include "command/all.qc"
+
+#include "weapons/projectile.qc" // TODO
+
+#include "../common/animdecide.qc"
+#include "../common/buffs.qc"
+#include "../common/effects.qc"
+#include "../common/mapinfo.qc"
+#include "../common/movetypes/include.qc"
+#include "../common/nades.qc"
+#include "../common/net_notice.qc"
+#include "../common/notifications.qc"
+#include "../common/physics.qc"
+#include "../common/playerstats.qc"
+#include "../common/util.qc"
+
+#include "../common/viewloc.qc"
+
+#include "../common/minigames/minigames.qc"
+#include "../common/minigames/cl_minigames.qc"
+
+#include "../common/items/all.qc"
+#include "../common/monsters/all.qc"
+#include "../common/mutators/all.qc"
+#include "../common/vehicles/all.qc"
+#include "../common/weapons/all.qc"
+
+#include "../common/turrets/cl_turrets.qc"
+#include "../common/turrets/turrets.qc"
+
+#include "../common/triggers/include.qc"
+
+#include "../csqcmodellib/cl_model.qc"
+#include "../csqcmodellib/cl_player.qc"
+#include "../csqcmodellib/interpolate.qc"
+
+#include "../server/mutators/mutator_multijump.qc"
+
+#include "../warpzonelib/anglestransform.qc"
+#include "../warpzonelib/client.qc"
+#include "../warpzonelib/common.qc"
+#include "../warpzonelib/util_server.qc"
+
+#include "../mod/client/progs.inc"
index 02e52fe..8a3c036 100644 (file)
@@ -1,79 +1,2 @@
 ../../csprogs.dat
-
-../common/util-pre.qh
-../dpdefs/csprogsdefs.qh
-../common/util-post.qh
-
-../lib/_all.inc
-
-announcer.qc
-bgmscript.qc
-controlpoint.qc
-csqcmodel_hooks.qc
-damage.qc
-effects.qc
-generator.qc
-gibs.qc
-hook.qc
-hud.qc
-hud_config.qc
-main.qc
-mapvoting.qc
-miscfunctions.qc
-modeleffects.qc
-movelib.qc
-particles.qc
-player_skeleton.qc
-rubble.qc
-scoreboard.qc
-shownames.qc
-teamradar.qc
-tuba.qc
-t_items.qc
-view.qc
-wall.qc
-
-command/all.qc
-
-weapons/projectile.qc // TODO
-
-../common/animdecide.qc
-../common/buffs.qc
-../common/effects.qc
-../common/mapinfo.qc
-../common/movetypes/include.qc
-../common/nades.qc
-../common/net_notice.qc
-../common/notifications.qc
-../common/physics.qc
-../common/playerstats.qc
-../common/util.qc
-
-../common/viewloc.qc
-
-../common/minigames/minigames.qc
-../common/minigames/cl_minigames.qc
-
-../common/items/all.qc
-../common/monsters/all.qc
-../common/mutators/all.qc
-../common/vehicles/all.qc
-../common/weapons/all.qc
-
-../common/turrets/cl_turrets.qc
-../common/turrets/turrets.qc
-
-../common/triggers/include.qc
-
-../csqcmodellib/cl_model.qc
-../csqcmodellib/cl_player.qc
-../csqcmodellib/interpolate.qc
-
-../server/mutators/mutator_multijump.qc
-
-../warpzonelib/anglestransform.qc
-../warpzonelib/client.qc
-../warpzonelib/common.qc
-../warpzonelib/util_server.qc
-
-../mod/client/progs.inc
+progs.inc
index 7f13ab5..0d143cb 100644 (file)
@@ -114,7 +114,7 @@ void Projectile_Draw()
                                break;
                }
 
-               if(Nade_FromProjectile(self.cnt) != NADE_TYPE_NULL)
+               if(Nade_FromProjectile(self.cnt) != NADE_TYPE_Null)
                        rot = self.avelocity;
 
                self.angles = AnglesTransform_ToAngles(AnglesTransform_Multiply(AnglesTransform_FromAngles(self.angles), rot * (t - self.spawntime)));
@@ -142,7 +142,7 @@ void Projectile_Draw()
                        break;
        }
 
-       if(Nade_FromProjectile(self.cnt) != NADE_TYPE_NULL)
+       if(Nade_FromProjectile(self.cnt) != NADE_TYPE_Null)
                trailorigin += v_up * 4;
 
        if(drawn)
@@ -290,8 +290,8 @@ void Ent_Projectile()
                        case PROJECTILE_GRENADE: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum(EFFECT_TR_GRENADE); break;
                        case PROJECTILE_GRENADE_BOUNCING: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum(EFFECT_TR_GRENADE); break;
                        case PROJECTILE_MINE: setmodel(self, "models/mine.md3");self.traileffect = particleeffectnum(EFFECT_TR_GRENADE); break;
-                       case PROJECTILE_BLASTER: setmodel(self, "models/laser.mdl");self.traileffect = particleeffectnum(EFFECT_NULL); break;
-                       case PROJECTILE_HLAC: setmodel(self, "models/hlac_bullet.md3");self.traileffect = particleeffectnum(EFFECT_NULL); break;
+                       case PROJECTILE_BLASTER: setmodel(self, "models/laser.mdl");self.traileffect = particleeffectnum(EFFECT_Null); break;
+                       case PROJECTILE_HLAC: setmodel(self, "models/hlac_bullet.md3");self.traileffect = particleeffectnum(EFFECT_Null); break;
                        case PROJECTILE_PORTO_RED: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum(EFFECT_TR_WIZSPIKE); self.scale = 4; break;
                        case PROJECTILE_PORTO_BLUE: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum(EFFECT_TR_WIZSPIKE); self.scale = 4; break;
                        case PROJECTILE_HOOKBOMB: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum(EFFECT_TR_KNIGHTSPIKE); break;
@@ -307,13 +307,13 @@ void Ent_Projectile()
                        case PROJECTILE_MAGE_SPIKE: setmodel(self, "models/ebomb.mdl"); self.traileffect = particleeffectnum(EFFECT_TR_VORESPIKE); break;
                        case PROJECTILE_SHAMBLER_LIGHTNING: setmodel(self, "models/ebomb.mdl"); self.traileffect = particleeffectnum(EFFECT_TR_NEXUIZPLASMA); break;
 
-                       case PROJECTILE_RAPTORBOMB:    setmodel(self, "models/vehicles/clusterbomb.md3"); self.gravity = 1; self.avelocity = '0 0 180'; self.traileffect = particleeffectnum(EFFECT_NULL); break;
-                       case PROJECTILE_RAPTORBOMBLET: setmodel(self, "models/vehicles/bomblet.md3");     self.gravity = 1; self.avelocity = '0 0 180'; self.traileffect = particleeffectnum(EFFECT_NULL); break;
+                       case PROJECTILE_RAPTORBOMB:    setmodel(self, "models/vehicles/clusterbomb.md3"); self.gravity = 1; self.avelocity = '0 0 180'; self.traileffect = particleeffectnum(EFFECT_Null); break;
+                       case PROJECTILE_RAPTORBOMBLET: setmodel(self, "models/vehicles/bomblet.md3");     self.gravity = 1; self.avelocity = '0 0 180'; self.traileffect = particleeffectnum(EFFECT_Null); break;
                        case PROJECTILE_RAPTORCANNON:  setmodel(self, "models/plasmatrail.mdl"); self.traileffect = particleeffectnum(EFFECT_TR_CRYLINKPLASMA); break;
 
                        case PROJECTILE_SPIDERROCKET: setmodel(self, "models/vehicles/rocket02.md3"); self.traileffect = particleeffectnum(EFFECT_SPIDERBOT_ROCKET_TRAIL); break;
                        case PROJECTILE_WAKIROCKET:   setmodel(self, "models/vehicles/rocket01.md3");  self.traileffect = particleeffectnum(EFFECT_RACER_ROCKET_TRAIL); break;
-                       case PROJECTILE_WAKICANNON:   setmodel(self, "models/laser.mdl");  self.traileffect = particleeffectnum(EFFECT_NULL); break;
+                       case PROJECTILE_WAKICANNON:   setmodel(self, "models/laser.mdl");  self.traileffect = particleeffectnum(EFFECT_Null); break;
 
                        case PROJECTILE_BUMBLE_GUN: setmodel(self, "models/elaser.mdl");self.traileffect = particleeffectnum(EFFECT_TR_NEXUIZPLASMA); break;
                        case PROJECTILE_BUMBLE_BEAM: setmodel(self, "models/elaser.mdl");self.traileffect = particleeffectnum(EFFECT_TR_NEXUIZPLASMA); break;
@@ -326,7 +326,7 @@ void Ent_Projectile()
                                if(MUTATOR_CALLHOOK(Ent_Projectile, self))
                                        break;
 
-                               if (Nade_FromProjectile(self.cnt) != NADE_TYPE_NULL)
+                               if (Nade_FromProjectile(self.cnt) != NADE_TYPE_Null)
                                {
                                        setmodel(self, W_Model("v_ok_grenade.md3"));
                                        self.traileffect = _particleeffectnum(Nade_TrailEffect(self.cnt, self.team));
@@ -461,7 +461,7 @@ void Ent_Projectile()
                                break;
                }
 
-               if(Nade_FromProjectile(self.cnt) != NADE_TYPE_NULL)
+               if(Nade_FromProjectile(self.cnt) != NADE_TYPE_Null)
                {
                        entity nade_type = Nade_FromProjectile(self.cnt);
                        self.mins = '-16 -16 -16';
index eeaba73..3eff9e2 100644 (file)
@@ -40,7 +40,7 @@ CLASS(Buff, Pickup)
 #endif
 ENDCLASS(Buff)
 
-REGISTER_BUFF(NULL);
+REGISTER_BUFF(Null);
 
 REGISTER_BUFF(AMMO) {
        this.m_prettyName = _("Ammo");
@@ -173,7 +173,7 @@ BUFF_SPAWNFUNCS(invisible,          BUFF_INVISIBLE)
 BUFF_SPAWNFUNCS(inferno,               BUFF_INFERNO)
 BUFF_SPAWNFUNCS(swapper,               BUFF_SWAPPER)
 BUFF_SPAWNFUNCS(magnet,                        BUFF_MAGNET)
-BUFF_SPAWNFUNCS(random,                        BUFF_NULL)
+BUFF_SPAWNFUNCS(random,                        BUFF_Null)
 
 BUFF_SPAWNFUNC_Q3TA_COMPAT(doubler,    BUFF_MEDIC)
 BUFF_SPAWNFUNC_Q3TA_COMPAT(resistance, BUFF_RESISTANCE)
index b72eab2..b0c452c 100644 (file)
@@ -54,7 +54,7 @@ void RegisterEffects_Done()
 
 // NOW we actually activate the declarations
 ACCUMULATE_FUNCTION(RegisterEffects, RegisterEffects_First);
-EFFECT(0, NULL, string_null)
+EFFECT(0, Null, string_null)
 #include "effects.inc"
 ACCUMULATE_FUNCTION(RegisterEffects, RegisterEffects_Done);
 
index 1183914..a8f6c53 100644 (file)
@@ -254,7 +254,7 @@ STATIC_INIT_LATE(Mutators) {
     bool HOOKFUNCTION_##name()
 
 #define MUTATOR_HOOKFUNCTION_2(mut, cb) \
-    MUTATOR_HOOKFUNCTION(mut, cb, CBC_ORDER_ANY)
+    MUTATOR_HOOKFUNCTION_3(mut, cb, CBC_ORDER_ANY)
 
 #define MUTATOR_HOOKFUNCTION_3(mut, cb, order) \
     _MUTATOR_CALLBACK(mut##_##cb, mut##_##cb) \
index 5a9877c..9ec6c29 100644 (file)
@@ -40,7 +40,7 @@ CLASS(Nade, Object)
     }
 ENDCLASS(Nade)
 
-REGISTER_NADE(NULL);
+REGISTER_NADE(Null);
 
 #define NADE_PROJECTILE(i, projectile, trail) do { \
     this.m_projectile[i] = projectile; \
@@ -109,7 +109,7 @@ entity Nade_FromProjectile(float proj)
             if (it.m_projectile[j] == proj) return it;
         }
     ));
-    return NADE_TYPE_NULL;
+    return NADE_TYPE_Null;
 }
 
 string Nade_TrailEffect(float proj, float nade_team)
index b3db771..1a799c8 100644 (file)
@@ -25,15 +25,15 @@ float Physics_ClientOption(entity pl, string option)
 {
        if(Physics_Valid(pl.cvar_cl_physics))
        {
-               string var = sprintf("g_physics_%s_%s", pl.cvar_cl_physics, option);
-               if(cvar_type(var) & CVAR_TYPEFLAG_EXISTS)
-                       return cvar(var);
+               string s = sprintf("g_physics_%s_%s", pl.cvar_cl_physics, option);
+               if(cvar_type(s) & CVAR_TYPEFLAG_EXISTS)
+                       return cvar(s);
        }
        if(autocvar_g_physics_clientselect && autocvar_g_physics_clientselect_default)
        {
-               string var = sprintf("g_physics_%s_%s", autocvar_g_physics_clientselect_default, option);
-               if(cvar_type(var) & CVAR_TYPEFLAG_EXISTS)
-                       return cvar(var);
+               string s = sprintf("g_physics_%s_%s", autocvar_g_physics_clientselect_default, option);
+               if(cvar_type(s) & CVAR_TYPEFLAG_EXISTS)
+                       return cvar(s);
        }
        return cvar(strcat("sv_", option));
 }
index d705f84..160399d 100644 (file)
@@ -5,7 +5,7 @@
 #include "../../../server/g_subs.qh"
 #include "../../../server/g_damage.qh"
 #include "../../../server/bot/bot.qh"
-#include "../../common/csqcmodel_settings.qh"
+#include "../../../common/csqcmodel_settings.qh"
 #include "../../../csqcmodellib/sv_model.qh"
 #include "../../../server/weapons/common.qh"
 
index b313c49..d9de973 100644 (file)
@@ -123,9 +123,11 @@ void SUB_CalcMove_controller_think (void)
                        destangle_x = -destangle_x; // flip up / down orientation
 
                        // take the shortest distance for the angles
-                       SUB_ANGLES(self.owner)_x -= 360 * floor((SUB_ANGLES(self.owner)_x - destangle_x) / 360 + 0.5);
-                       SUB_ANGLES(self.owner)_y -= 360 * floor((SUB_ANGLES(self.owner)_y - destangle_y) / 360 + 0.5);
-                       SUB_ANGLES(self.owner)_z -= 360 * floor((SUB_ANGLES(self.owner)_z - destangle_z) / 360 + 0.5);
+                       vector v = SUB_ANGLES(self.owner);
+                       v.x -= 360 * floor((v.x - destangle_x) / 360 + 0.5);
+                       v.y -= 360 * floor((v.y - destangle_y) / 360 + 0.5);
+                       v.z -= 360 * floor((v.z - destangle_z) / 360 + 0.5);
+                       SUB_ANGLES(self.owner) = v;
                        angloc = destangle - SUB_ANGLES(self.owner);
                        angloc = angloc * (1 / PHYS_INPUT_FRAMETIME); // so it arrives for the next frame
                        self.owner.SUB_AVELOCITY = angloc;
index 058ffd5..e0701dc 100644 (file)
@@ -8,15 +8,14 @@ void target_speaker_use_activator()
        string snd;
        if(substring(self.noise, 0, 1) == "*")
        {
-               var .string sample;
-               sample = GetVoiceMessageSampleField(substring(self.noise, 1, -1));
+               var .string sample = GetVoiceMessageSampleField(substring(self.noise, 1, -1));
                if(GetPlayerSoundSampleField_notFound)
                        snd = "misc/null.wav";
-               else if(activator.sample == "")
+               else if(activator.(sample) == "")
                        snd = "misc/null.wav";
                else
                {
-                       tokenize_console(activator.sample);
+                       tokenize_console(activator.(sample));
                        float n;
                        n = stof(argv(1));
                        if(n > 0)
@@ -35,15 +34,14 @@ void target_speaker_use_on()
        string snd;
        if(substring(self.noise, 0, 1) == "*")
        {
-               var .string sample;
-               sample = GetVoiceMessageSampleField(substring(self.noise, 1, -1));
+               var .string sample = GetVoiceMessageSampleField(substring(self.noise, 1, -1));
                if(GetPlayerSoundSampleField_notFound)
                        snd = "misc/null.wav";
-               else if(activator.sample == "")
+               else if(activator.(sample) == "")
                        snd = "misc/null.wav";
                else
                {
-                       tokenize_console(activator.sample);
+                       tokenize_console(activator.(sample));
                        float n;
                        n = stof(argv(1));
                        if(n > 0)
index 9eb69f2..4d35ee3 100644 (file)
@@ -7,27 +7,14 @@ void Dump_Turret_Settings(void);
 float tur_config_file;
 float tur_config_alsoprint;
 
-#define MAX_TUR_CONFIG 256
+const int MAX_TUR_CONFIG = 256;
 float TUR_CONFIG_COUNT;
 string tur_config_queue[MAX_TUR_CONFIG];
 
-#define TUR_CONFIG_QUEUE(a) { \
-       tur_config_queue[TUR_CONFIG_COUNT] = a; \
-       ++TUR_CONFIG_COUNT; }
-
 #define TUR_CONFIG_WRITETOFILE(a) { \
        fputs(tur_config_file, a); \
        if(tur_config_alsoprint) { LOG_INFO(a); } }
 
-#define TUR_CONFIG_WRITE_CVARS(turret,name) \
-               { TUR_CONFIG_QUEUE( \
-                       sprintf("set g_turrets_unit_%s_%s %g\n", #turret, #name, \
-                       cvar(sprintf("g_turrets_unit_%s_%s", #turret, #name)))) } \
-
-#define TUR_CONFIG_SETTINGS(tursettings) \
-       #define TUR_ADD_CVAR(turret,name) TUR_CONFIG_WRITE_CVARS(turret,name) \
-       tursettings \
-       #undef TUR_ADD_CVAR
 
 #endif
 
index b3736af..0c2250b 100644 (file)
@@ -158,7 +158,7 @@ void register_turret(float id, float(float) func, float turretflags, vector min_
 void register_turrets_done();
 
 const float TUR_MAXCOUNT = 24;
-#define TUR_FIRST 1
+const int TUR_FIRST = 1;
 float TUR_COUNT;
 float TUR_LAST;
 
@@ -180,22 +180,8 @@ float TUR_LAST;
        REGISTER_TURRET_2(TUR_##id,func,turretflags,min_s,max_s,modelname,headmodelname,shortname,mname)
 #endif
 
-#define TUR_DUPECHECK(dupecheck,cvar) \
-       #ifndef dupecheck \
-               #define dupecheck \
-               float cvar; \
-       #else \
-               #error DUPLICATE TURRET CVAR: cvar \
-       #endif
-
-#define TUR_ADD_CVAR(turret,name) \
-               TUR_DUPECHECK(TUR_CVAR_##turret##_##name, autocvar_g_turrets_unit_##turret##_##name)
-
-#define TUR_CVAR(turret,name) autocvar_g_turrets_unit_##turret##_##name
-
 #include "all.qh"
 
-#undef TUR_ADD_CVAR
 #undef REGISTER_TURRET
 ACCUMULATE_FUNCTION(RegisterTurrets, register_turrets_done);
 
index b81fd2a..22cdfda 100644 (file)
@@ -13,7 +13,7 @@
 
 #ifndef QCC_SUPPORT_NIL
     #ifdef GMQCC
-        #define QCC_SUPPORT_NIL
+        #define QCC_SUPPORT_NIL 1
     #endif
 #endif
 
@@ -48,8 +48,8 @@
 #ifdef GMQCC
     #define OVERLOAD(F, ...) F##_##__VA_COUNT__(__VA_ARGS__)
 #else
-    #define OVERLOAD_(F,_9,_8,_7,_6,_5,_4,_3,_2,_1,n,...) F##_##n
-    #define OVERLOAD(F, ...) OVERLOAD_(F,__VA_ARGS__,9,8,7,6,5,4,3,2,1)(__VA_ARGS__)
+    #define OVERLOAD_(F,_16,_15,_14,_13,_12,_11,_10,_9,_8,_7,_6,_5,_4,_3,_2,_1,n,...) F##_##n
+    #define OVERLOAD(F, ...) OVERLOAD_(F,__VA_ARGS__,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1)(__VA_ARGS__)
 #endif
 
 #define LAMBDA(...) { __VA_ARGS__ ; }
index f0316ab..923ed4e 100644 (file)
@@ -48,9 +48,9 @@ STATIC_INIT(vehicles_common_initialize)
 
 entity get_vehicleinfo(int id)
 {
-       if (id < VEH_FIRST || id > VEH_LAST) return VEH_NULL;
+       if (id < VEH_FIRST || id > VEH_LAST) return VEH_Null;
        entity m = vehicle_info[id];
-       return m ? m : VEH_NULL;
+       return m ? m : VEH_Null;
 }
 
 #endif
index fa9e83f..a18bfe1 100644 (file)
@@ -76,7 +76,7 @@ const int VEH_FIRST = 1;
     REGISTER_INIT(VEH, id)
 REGISTER_REGISTRY(RegisterVehicles)
 
-REGISTER_VEHICLE(NULL, Vehicle);
+REGISTER_VEHICLE(Null, Vehicle);
 
 #include "all.inc"
 
index bc8399b..ea9f18f 100644 (file)
@@ -599,16 +599,16 @@ void vehicle_use()
 
 void vehicles_regen(float timer, .float regen_field, float field_max, float rpause, float regen, float delta_time, float _healthscale)
 {SELFPARAM();
-       if(self.regen_field < field_max)
+       if(self.(regen_field) < field_max)
        if(timer + rpause < time)
        {
                if(_healthscale)
                        regen = regen * (self.vehicle_health / self.max_health);
 
-               self.regen_field = min(self.regen_field + regen * delta_time, field_max);
+               self.(regen_field) = min(self.(regen_field) + regen * delta_time, field_max);
 
                if(self.owner)
-                       self.owner.regen_field = (self.regen_field / field_max) * 100;
+                       self.owner.(regen_field) = (self.(regen_field) / field_max) * 100;
        }
 }
 
index 03a77f0..9bc8f3b 100644 (file)
@@ -39,7 +39,7 @@ PORTO_SETTINGS(WEP_ADD_CVAR, WEP_ADD_PROP)
 #endif
 #ifdef IMPLEMENTATION
 #ifdef SVQC
-#include "../triggers/trigger/jumppads.qh"
+#include "../../triggers/trigger/jumppads.qh"
 
 void spawnfunc_weapon_porto(void) { weapon_defaultspawnfunc(WEP_PORTO.m_id); }
 
index 423f364..7e1a1ed 100644 (file)
@@ -25,7 +25,7 @@
     func()
 #else
 # define ACCUMULATE_FUNCTION(func,otherfunc) \
-    .float _ACCUMULATE_##func##__##otherfunc
+    .float _ACCUMULATE_##func##__##otherfunc;
 void ACCUMULATE_call(string func)
 {
     float i;
index 87e3aea..789b1f9 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef NIL_H
 #define NIL_H
 
-#ifdef QCC_SUPPORT_NIL
+#if QCC_SUPPORT_NIL
 #define func_null nil
 #define string_null nil
 #else
index 63a70f7..d4efe9a 100644 (file)
@@ -40,7 +40,7 @@ entity __spawn(string _classname, string _sourceFile, int _sourceLine) {
 // Classes have a `spawn##cname(entity)` constructor
 // The parameter is used across [[accumulate]] functions
 
-// Macro to hide this implementation detail
+// Macros to hide this implementation detail:
 #define NEW(cname, ...) \
     OVERLOAD(spawn##cname, new(cname), ##__VA_ARGS__)
 
diff --git a/qcsrc/menu/progs.inc b/qcsrc/menu/progs.inc
new file mode 100644 (file)
index 0000000..45c52c8
--- /dev/null
@@ -0,0 +1,29 @@
+#include "../common/util-pre.qh"
+#include "../dpdefs/menudefs.qh"
+#include "../dpdefs/keycodes.qh"
+#include "../common/util-post.qh"
+
+#include "../lib/_all.inc"
+
+#include "oo/classes.qc"
+
+#include "draw.qc"
+#include "menu.qc"
+
+#include "command/all.qc"
+
+#include "xonotic/util.qc"
+
+#include "../common/campaign_file.qc"
+#include "../common/campaign_setup.qc"
+#include "../common/mapinfo.qc"
+#include "../common/playerstats.qc"
+#include "../common/util.qc"
+
+#include "../common/items/all.qc"
+#include "../common/monsters/all.qc"
+#include "../common/mutators/all.qc"
+#include "../common/vehicles/all.qc"
+#include "../common/weapons/all.qc"
+
+#include "../mod/menu/progs.inc"
index 158d4f5..1eb2b72 100644 (file)
@@ -1,32 +1,2 @@
 ../../menu.dat
-
-../common/util-pre.qh
-../dpdefs/menudefs.qh
-../dpdefs/keycodes.qh
-../common/util-post.qh
-
-../lib/_all.inc
-
-oo/classes.qc
-
-draw.qc
-menu.qc
-
-command/all.qc
-
-xonotic/util.qc
-
-../common/campaign_file.qc
-../common/campaign_setup.qc
-../common/mapinfo.qc
-../common/playerstats.qc
-../common/util.qc
-
-../common/items/all.qc
-../common/monsters/all.qc
-../common/mutators/all.qc
-../common/vehicles/all.qc
-../common/weapons/all.qc
-
-
-../mod/menu/progs.inc
+progs.inc
index 963f113..1b3554e 100644 (file)
@@ -1241,10 +1241,9 @@ void PlayerSound(.string samplefield, float chan, float voicetype)
 
 void VoiceMessage(string type, string msg)
 {SELFPARAM();
-       var .string sample;
        float voicetype, ownteam;
        float flood;
-       sample = GetVoiceMessageSampleField(type);
+       var .string sample = GetVoiceMessageSampleField(type);
 
        if(GetPlayerSoundSampleField_notFound)
        {
index 6cf7c1a..4f4eab3 100644 (file)
@@ -1084,8 +1084,8 @@ void ctf_DelayedFlagSetup(void) // called after a flag is placed on a map by ctf
 
 void set_flag_string(entity flag, .string field, string value, string teamname)
 {
-       if(flag.field == "")
-               flag.field = strzone(sprintf(value,teamname));
+       if(flag.(field) == "")
+               flag.(field) = strzone(sprintf(value,teamname));
 }
 
 void ctf_FlagSetup(int teamnumber, entity flag) // called when spawning a flag entity on the map as a spawnfunc
index 62e4d9f..3464a64 100644 (file)
@@ -12,7 +12,7 @@ entity buff_FirstFromFlags(int _buffs)
        {
                FOREACH(BUFFS, it.m_itemid & _buffs, LAMBDA(return it));
        }
-       return BUFF_NULL;
+       return BUFF_Null;
 }
 
 bool buffs_BuffModel_Customize()
@@ -197,7 +197,7 @@ void buff_Touch()
 
 float buff_Available(entity buff)
 {
-       if (buff == BUFF_NULL)
+       if (buff == BUFF_Null)
                return false;
        if (buff == BUFF_AMMO && ((start_items & IT_UNLIMITED_WEAPON_AMMO) || (start_items & IT_UNLIMITED_AMMO) || (cvar("g_melee_only"))))
                return false;
@@ -806,7 +806,7 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerThink)
        if(self.buffs != self.oldbuffs)
        {
                entity buff = buff_FirstFromFlags(self.buffs);
-               float bufftime = buff != BUFF_NULL ? buff.m_time(buff) : 0;
+               float bufftime = buff != BUFF_Null ? buff.m_time(buff) : 0;
                self.buff_time = (bufftime) ? time + bufftime : 0;
 
                BUFF_ONADD(BUFF_AMMO)
diff --git a/qcsrc/server/progs.inc b/qcsrc/server/progs.inc
new file mode 100644 (file)
index 0000000..b387ed3
--- /dev/null
@@ -0,0 +1,123 @@
+#include "../common/util-pre.qh"
+#include "sys-pre.qh"
+#include "../dpdefs/progsdefs.qh"
+#include "../dpdefs/dpextensions.qh"
+#include "sys-post.qh"
+#include "../common/util-post.qh"
+
+#include "../lib/_all.inc"
+
+#include "anticheat.qc"
+#include "antilag.qc"
+#include "campaign.qc"
+#include "cheats.qc"
+#include "cl_client.qc"
+#include "cl_impulse.qc"
+#include "cl_player.qc"
+#include "controlpoint.qc"
+#include "csqceffects.qc"
+#include "ent_cs.qc"
+#include "g_damage.qc"
+#include "g_hook.qc"
+// #include "g_lights.qc" // TODO: was never used
+#include "g_models.qc"
+#include "g_subs.qc"
+#include "g_violence.qc"
+#include "g_world.qc"
+#include "generator.qc"
+#include "ipban.qc"
+#include "item_key.qc"
+#include "mapvoting.qc"
+#include "miscfunctions.qc"
+#include "movelib.qc"
+// #include "pathlib.qc" // TODO: was never used. Seems to duplicate `pathlib/`
+#include "playerdemo.qc"
+#include "portals.qc"
+#include "race.qc"
+#include "round_handler.qc"
+#include "scores.qc"
+#include "scores_rules.qc"
+#include "spawnpoints.qc"
+#include "steerlib.qc"
+#include "sv_main.qc"
+#include "teamplay.qc"
+#include "t_halflife.qc"
+#include "t_items.qc"
+#include "t_quake3.qc"
+#include "t_quake.qc"
+
+#include "bot/aim.qc"
+#include "bot/bot.qc"
+#include "bot/navigation.qc"
+#include "bot/scripting.qc"
+#include "bot/waypoints.qc"
+
+#include "bot/havocbot/havocbot.qc"
+#include "bot/havocbot/role_keyhunt.qc"
+#include "bot/havocbot/roles.qc"
+
+#include "command/all.qc"
+
+#include "mutators/mutators_include.qc"
+#include "mutators/mutators.qc"
+
+#include "pathlib/costs.qc"
+#include "pathlib/expandnode.qc"
+#include "pathlib/main.qc"
+#include "pathlib/movenode.qc"
+#include "pathlib/path_waypoint.qc"
+#include "pathlib/utility.qc"
+
+#include "weapons/accuracy.qc"
+#include "weapons/common.qc"
+#include "weapons/csqcprojectile.qc" // TODO
+#include "weapons/hitplot.qc"
+#include "weapons/selection.qc"
+#include "weapons/spawning.qc"
+#include "weapons/throwing.qc"
+#include "weapons/tracing.qc"
+#include "weapons/weaponstats.qc"
+#include "weapons/weaponsystem.qc"
+
+#include "../common/animdecide.qc"
+#include "../common/buffs.qc"
+#include "../common/campaign_file.qc"
+#include "../common/campaign_setup.qc"
+#include "../common/effects.qc"
+#include "../common/mapinfo.qc"
+#include "../common/monsters/spawn.qc"
+#include "../common/monsters/sv_monsters.qc"
+#include "../common/minigames/minigames.qc"
+#include "../common/minigames/sv_minigames.qc"
+#include "../common/movetypes/include.qc"
+#include "../common/nades.qc"
+#include "../common/net_notice.qc"
+#include "../common/notifications.qc"
+#include "../common/physics.qc"
+#include "../common/playerstats.qc"
+#include "../common/viewloc.qc"
+#include "../common/triggers/include.qc"
+#include "../common/util.qc"
+
+#include "../common/items/all.qc"
+#include "../common/monsters/all.qc"
+#include "../common/mutators/all.qc"
+#include "../common/vehicles/all.qc"
+#include "../common/weapons/all.qc" // TODO
+
+#include "../common/turrets/sv_turrets.qc"
+#include "../common/turrets/config.qc"
+#include "../common/turrets/util.qc"
+#include "../common/turrets/turrets.qc"
+#include "../common/turrets/checkpoint.qc"
+#include "../common/turrets/targettrigger.qc"
+#include "../common/weapons/config.qc"
+
+#include "../csqcmodellib/sv_model.qc"
+
+#include "../warpzonelib/anglestransform.qc"
+#include "../warpzonelib/common.qc"
+#include "../warpzonelib/server.qc"
+#include "../warpzonelib/util_server.qc"
+
+#include "../mod/server/progs.inc"
index f9193cb..9ba92b4 100644 (file)
@@ -1,125 +1,2 @@
 ../../progs.dat
-
-../common/util-pre.qh
-sys-pre.qh
-../dpdefs/progsdefs.qh
-../dpdefs/dpextensions.qh
-sys-post.qh
-../common/util-post.qh
-
-../lib/_all.inc
-
-anticheat.qc
-antilag.qc
-campaign.qc
-cheats.qc
-cl_client.qc
-cl_impulse.qc
-cl_player.qc
-controlpoint.qc
-csqceffects.qc
-ent_cs.qc
-g_damage.qc
-g_hook.qc
-// g_lights.qc // TODO: was never used
-g_models.qc
-g_subs.qc
-g_violence.qc
-g_world.qc
-generator.qc
-ipban.qc
-item_key.qc
-mapvoting.qc
-miscfunctions.qc
-movelib.qc
-// pathlib.qc // TODO: was never used. Seems to duplicate `pathlib/`
-playerdemo.qc
-portals.qc
-race.qc
-round_handler.qc
-scores.qc
-scores_rules.qc
-spawnpoints.qc
-steerlib.qc
-sv_main.qc
-teamplay.qc
-t_halflife.qc
-t_items.qc
-t_quake3.qc
-t_quake.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/roles.qc
-
-command/all.qc
-
-mutators/mutators_include.qc
-mutators/mutators.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
-weapons/hitplot.qc
-weapons/selection.qc
-weapons/spawning.qc
-weapons/throwing.qc
-weapons/tracing.qc
-weapons/weaponstats.qc
-weapons/weaponsystem.qc
-
-../common/animdecide.qc
-../common/buffs.qc
-../common/campaign_file.qc
-../common/campaign_setup.qc
-../common/effects.qc
-../common/mapinfo.qc
-../common/monsters/spawn.qc
-../common/monsters/sv_monsters.qc
-../common/minigames/minigames.qc
-../common/minigames/sv_minigames.qc
-../common/movetypes/include.qc
-../common/nades.qc
-../common/net_notice.qc
-../common/notifications.qc
-../common/physics.qc
-../common/playerstats.qc
-../common/viewloc.qc
-../common/triggers/include.qc
-../common/util.qc
-
-../common/items/all.qc
-../common/monsters/all.qc
-../common/mutators/all.qc
-../common/vehicles/all.qc
-../common/weapons/all.qc // TODO
-
-../common/turrets/sv_turrets.qc
-../common/turrets/config.qc
-../common/turrets/util.qc
-../common/turrets/turrets.qc
-../common/turrets/checkpoint.qc
-../common/turrets/targettrigger.qc
-../common/weapons/config.qc
-
-../csqcmodellib/sv_model.qc
-
-../warpzonelib/anglestransform.qc
-../warpzonelib/common.qc
-../warpzonelib/server.qc
-../warpzonelib/util_server.qc
-
-../mod/server/progs.inc
+progs.inc