]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Mario/combined_updates
authorMario <zacjardine@y7mail.com>
Sat, 18 Apr 2015 05:06:41 +0000 (15:06 +1000)
committerMario <zacjardine@y7mail.com>
Sat, 18 Apr 2015 05:06:41 +0000 (15:06 +1000)
Conflicts:
qcsrc/client/tturrets.qc
qcsrc/common/weapons/w_arc.qc
qcsrc/server/tturrets/system/system_main.qc
qcsrc/server/vehicles/vehicles.qc

1  2 
qcsrc/client/hud.qc
qcsrc/client/hud_config.qc
qcsrc/client/main.qc
qcsrc/common/notifications.qc
qcsrc/common/turrets/turrets.qc
qcsrc/common/weapons/w_arc.qc
qcsrc/common/weapons/w_devastator.qc
qcsrc/common/weapons/w_hagar.qc

Simple merge
Simple merge
Simple merge
Simple merge
index 4c588e9562afd1b111ee3a093601306a73602268,0000000000000000000000000000000000000000..a99d1f1e9ea5348d99dae7c831bef2f3878f92b7
mode 100644,000000..100644
--- /dev/null
@@@ -1,78 -1,0 +1,77 @@@
-       precache_model ("models/turrets/terrainbase.md3");
 +#include "all.qh"
 +
 +// TURRET PLUGIN SYSTEM
 +entity turret_info[TUR_MAXCOUNT];
 +entity dummy_turret_info;
 +
 +void turrets_common_precache()
 +{
 +      precache_sound ("weapons/rocket_impact.wav");
 +      precache_model ("models/turrets/base-gib1.md3");
 +      precache_model ("models/turrets/base-gib2.md3");
 +      precache_model ("models/turrets/base-gib3.md3");
 +      precache_model ("models/turrets/base-gib4.md3");
 +      precache_model ("models/turrets/head-gib1.md3");
 +      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/base.md3");
 +      precache_model ("models/turrets/rocket.md3");
 +      
 +      precache_model ("models/turrets/c512.md3");
 +      precache_model ("models/marker.md3");
 +      
 +#ifdef TURRET_DEBUG
 +      precache_model ("models/turrets/c512.md3");
 +      precache_model ("models/pathlib/goodsquare.md3");
 +      precache_model ("models/pathlib/badsquare.md3");
 +      precache_model ("models/pathlib/square.md3");
 +      precache_model ("models/pathlib/edge.md3");
 +#endif
 +}
 +
 +void register_turret(float id, float(float) func, float turretflags, vector min_s, vector max_s, string modelname, string headmodelname, string shortname, string mname)
 +{
 +      entity e;
 +      turret_info[id - 1] = e = spawn();
 +      e.classname = "turret_info";
 +      e.turretid = id;
 +      e.netname = shortname;
 +      e.turret_name = mname;
 +      e.turret_func = func;
 +      e.mdl = modelname;
 +      e.cvar_basename = shortname;
 +      e.spawnflags = turretflags;
 +      e.mins = min_s;
 +      e.maxs = max_s;
 +      e.model = strzone(strcat("models/turrets/", modelname));
 +      e.head_model = strzone(strcat("models/turrets/", headmodelname));
 +      
 +      #ifndef MENUQC
 +      turrets_common_precache();
 +      #endif
 +}
 +float t_null(float dummy) { return 0; }
 +void register_turrets_done()
 +{
 +      dummy_turret_info = spawn();
 +      dummy_turret_info.classname = "turret_info";
 +      dummy_turret_info.turretid = 0; // you can recognize dummies by this
 +      dummy_turret_info.netname = "";
 +      dummy_turret_info.turret_name = "Turret";
 +      dummy_turret_info.turret_func = t_null;
 +      dummy_turret_info.mdl = "";
 +      dummy_turret_info.mins = '-0 -0 -0';
 +      dummy_turret_info.maxs = '0 0 0';
 +      dummy_turret_info.model = "";
 +}
 +entity get_turretinfo(float id)
 +{
 +      entity m;
 +      if(id < TUR_FIRST || id > TUR_LAST)
 +              return dummy_turret_info;
 +      m = turret_info[id - 1];
 +      if(m)
 +              return m;
 +      return dummy_turret_info;
 +}
Simple merge
Simple merge
Simple merge