]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix #2199 "sv_cmd dumpturrets doesn't work". The new implementation is similar to...
authorterencehill <piuntn@gmail.com>
Thu, 11 Apr 2019 15:10:22 +0000 (17:10 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 11 Apr 2019 15:10:22 +0000 (17:10 +0200)
14 files changed:
qcsrc/common/turrets/all.qh
qcsrc/common/turrets/config.qh
qcsrc/common/turrets/turret/ewheel.qh
qcsrc/common/turrets/turret/flac.qh
qcsrc/common/turrets/turret/fusionreactor.qh
qcsrc/common/turrets/turret/hellion.qh
qcsrc/common/turrets/turret/hk.qh
qcsrc/common/turrets/turret/machinegun.qh
qcsrc/common/turrets/turret/mlrs.qh
qcsrc/common/turrets/turret/phaser.qh
qcsrc/common/turrets/turret/plasma.qh
qcsrc/common/turrets/turret/plasma_dual.qh
qcsrc/common/turrets/turret/tesla.qh
qcsrc/common/turrets/turret/walker.qh

index e63a931a67361df15b0d7b15f71fbc16e484c862..b82af599b0c5fec587b4a47ce6422bd291ee79e6 100644 (file)
@@ -11,6 +11,18 @@ REGISTRY(Turrets, BITS(5))
 REGISTER_REGISTRY(Turrets)
 REGISTRY_CHECK(Turrets)
 
+#define TR_PROPS(L, class, prefix) \
+       L(TR_CONFIG_BEGIN, TR_CONFIG, TR_CONFIG_END, class, prefix) \
+       /**/ \
+
+#define TR_CONFIG(class, turname, fld, T)     _TR_CONFIG(class, fld, T, turname)
+#define TR_CONFIG_BEGIN(class) METHOD(class, tr_config, void(class this)) {
+       #ifdef SVQC
+               #define _TR_CONFIG(class, fld, T, turname) if (#turname == this.netname) TUR_CONFIG_WRITE_CVARS(turname, fld, T);
+       #else
+               #define _TR_CONFIG(class, fld, T, turname)
+       #endif
+#define TR_CONFIG_END() }
 
 GENERIC_COMMAND(dumpturrets, "Dump all turrets into turrets_dump.txt")
 {
index ad9c3846f9a239bd4a9f9eb75609732ca83a2a49..2c47be09116de219715ec4c3bc9714d07972ed44 100644 (file)
@@ -7,6 +7,20 @@ float tur_config_file;
 float tur_config_alsoprint;
 
 float TUR_CONFIG_COUNT;
+#define TUR_CONFIG_QUEUE(a) { \
+       config_queue[TUR_CONFIG_COUNT] = a; \
+       ++TUR_CONFIG_COUNT; }
 
+#define TUR_CONFIG_WRITE_CVARS(turname, name, T) TUR_CONFIG_WRITE_PROPS_##T(turname, name)
+
+#define TUR_CONFIG_WRITE_PROPS_string(turname, name) \
+       { TUR_CONFIG_QUEUE( \
+               sprintf("set g_turrets_unit_%s_%s \"%s\"\n", #turname, #name, \
+               cvar_string(sprintf("g_turrets_unit_%s_%s", #turname, #name)))) }
+
+#define TUR_CONFIG_WRITE_PROPS_float(turname, name) \
+       { TUR_CONFIG_QUEUE( \
+               sprintf("set g_turrets_unit_%s_%s %g\n", #turname, #name, \
+               cvar(sprintf("g_turrets_unit_%s_%s", #turname, #name)))) }
 
 #endif
index ed1a5a6307173d540291b8596145307c278bb5ae..4e4cc31fdf2525e04f68bb67c296605457b215d1 100644 (file)
@@ -14,5 +14,46 @@ CLASS(EWheel, Turret)
 /* netname    */ ATTRIB(EWheel, netname, string, "ewheel");
 /* fullname   */ ATTRIB(EWheel, turret_name, string, _("eWheel Turret"));
     ATTRIB(EWheel, m_weapon, Weapon, WEP_EWHEEL);
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, aim_firetolerance_dist, float) \
+               P(class, prefix, aim_maxpitch, float) \
+               P(class, prefix, aim_maxrot, float) \
+               P(class, prefix, aim_speed, float) \
+               P(class, prefix, ammo, float) \
+               P(class, prefix, ammo_max, float) \
+               P(class, prefix, ammo_recharge, float) \
+               P(class, prefix, health, float) \
+               P(class, prefix, respawntime, float) \
+               P(class, prefix, shot_dmg, float) \
+               P(class, prefix, shot_force, float) \
+               P(class, prefix, shot_radius, float) \
+               P(class, prefix, shot_refire, float) \
+               P(class, prefix, shot_speed, float) \
+               P(class, prefix, shot_spread, float) \
+               P(class, prefix, shot_volly, float) \
+               P(class, prefix, shot_volly_refire, float) \
+               P(class, prefix, speed_fast, float) \
+               P(class, prefix, speed_slow, float) \
+               P(class, prefix, speed_slower, float) \
+               P(class, prefix, speed_stop, float) \
+               P(class, prefix, target_range, float) \
+               P(class, prefix, target_range_min, float) \
+               P(class, prefix, target_range_optimal, float) \
+               P(class, prefix, target_select_anglebias, float) \
+               P(class, prefix, target_select_missilebias, float) \
+               P(class, prefix, target_select_playerbias, float) \
+               P(class, prefix, target_select_rangebias, float) \
+               P(class, prefix, target_select_samebias, float) \
+               P(class, prefix, track_accel_pitch, float) \
+               P(class, prefix, track_accel_rot, float) \
+               P(class, prefix, track_blendrate, float) \
+               P(class, prefix, track_type, float) \
+               P(class, prefix, turnrate, float) \
+       END()
+       TR_PROPS(X, EWheel, ewheel)
+#undef X
+
 ENDCLASS(EWheel)
 REGISTER_TURRET(EWHEEL, NEW(EWheel));
index 216dcd71f8dea2069369656407e46319ce9a33b4..041a8ea889c0530cf2db5bd1205d830a70465208 100644 (file)
@@ -12,5 +12,41 @@ CLASS(Flac, Turret)
 /* netname    */ ATTRIB(Flac, netname, string, "flac");
 /* fullname   */ ATTRIB(Flac, turret_name, string, _("FLAC Cannon"));
     ATTRIB(Flac, m_weapon, Weapon, WEP_FLAC);
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, aim_firetolerance_dist, float) \
+               P(class, prefix, aim_maxpitch, float) \
+               P(class, prefix, aim_maxrot, float) \
+               P(class, prefix, aim_speed, float) \
+               P(class, prefix, ammo, float) \
+               P(class, prefix, ammo_max, float) \
+               P(class, prefix, ammo_recharge, float) \
+               P(class, prefix, health, float) \
+               P(class, prefix, respawntime, float) \
+               P(class, prefix, shot_dmg, float) \
+               P(class, prefix, shot_force, float) \
+               P(class, prefix, shot_radius, float) \
+               P(class, prefix, shot_refire, float) \
+               P(class, prefix, shot_speed, float) \
+               P(class, prefix, shot_spread, float) \
+               P(class, prefix, shot_volly, float) \
+               P(class, prefix, shot_volly_refire, float) \
+               P(class, prefix, target_range, float) \
+               P(class, prefix, target_range_min, float) \
+               P(class, prefix, target_range_optimal, float) \
+               P(class, prefix, target_select_anglebias, float) \
+               P(class, prefix, target_select_missilebias, float) \
+               P(class, prefix, target_select_playerbias, float) \
+               P(class, prefix, target_select_rangebias, float) \
+               P(class, prefix, target_select_samebias, float) \
+               P(class, prefix, track_accel_pitch, float) \
+               P(class, prefix, track_accel_rot, float) \
+               P(class, prefix, track_blendrate, float) \
+               P(class, prefix, track_type, float) \
+       END()
+       TR_PROPS(X, Flac, flac)
+#undef X
+
 ENDCLASS(Flac)
 REGISTER_TURRET(FLAC, NEW(Flac));
index 2ca369b941b491210c36a719301afcc89d2a3257..f3b1bfa540b85c0517e92b1f5652bb59af6a78d0 100644 (file)
@@ -10,4 +10,39 @@ CLASS(FusionReactor, Turret)
 /* netname    */ ATTRIB(FusionReactor, netname, string, "fusreac");
 /* fullname   */ ATTRIB(FusionReactor, turret_name, string, _("Fusion Reactor"));
 ENDCLASS(FusionReactor)
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, aim_firetolerance_dist, float) \
+               P(class, prefix, aim_maxpitch, float) \
+               P(class, prefix, aim_maxrot, float) \
+               P(class, prefix, aim_speed, float) \
+               P(class, prefix, ammo, float) \
+               P(class, prefix, ammo_max, float) \
+               P(class, prefix, ammo_recharge, float) \
+               P(class, prefix, health, float) \
+               P(class, prefix, respawntime, float) \
+               P(class, prefix, shot_dmg, float) \
+               P(class, prefix, shot_force, float) \
+               P(class, prefix, shot_radius, float) \
+               P(class, prefix, shot_refire, float) \
+               P(class, prefix, shot_speed, float) \
+               P(class, prefix, shot_spread, float) \
+               P(class, prefix, shot_volly, float) \
+               P(class, prefix, shot_volly_refire, float) \
+               P(class, prefix, target_range, float) \
+               P(class, prefix, target_range_min, float) \
+               P(class, prefix, target_range_optimal, float) \
+               P(class, prefix, target_select_anglebias, float) \
+               P(class, prefix, target_select_playerbias, float) \
+               P(class, prefix, target_select_rangebias, float) \
+               P(class, prefix, target_select_samebias, float) \
+               P(class, prefix, track_accel_pitch, float) \
+               P(class, prefix, track_accel_rot, float) \
+               P(class, prefix, track_blendrate, float) \
+               P(class, prefix, track_type, float) \
+       END()
+       TR_PROPS(X, FusionReactor, fusreac)
+#undef X
+
 REGISTER_TURRET(FUSIONREACTOR, NEW(FusionReactor));
index 216b4c7ec18f00e13304a99ed5e477f73db2be79..83556ebc52eed52e2c8a94beb57cfc1b14a32989 100644 (file)
@@ -12,5 +12,43 @@ CLASS(Hellion, Turret)
 /* netname    */ ATTRIB(Hellion, netname, string, "hellion");
 /* fullname   */ ATTRIB(Hellion, turret_name, string, _("Hellion Missile Turret"));
     ATTRIB(Hellion, m_weapon, Weapon, WEP_HELLION);
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, aim_firetolerance_dist, float) \
+               P(class, prefix, aim_maxpitch, float) \
+               P(class, prefix, aim_maxrot, float) \
+               P(class, prefix, aim_speed, float) \
+               P(class, prefix, ammo, float) \
+               P(class, prefix, ammo_max, float) \
+               P(class, prefix, ammo_recharge, float) \
+               P(class, prefix, health, float) \
+               P(class, prefix, respawntime, float) \
+               P(class, prefix, shot_dmg, float) \
+               P(class, prefix, shot_force, float) \
+               P(class, prefix, shot_radius, float) \
+               P(class, prefix, shot_refire, float) \
+               P(class, prefix, shot_speed, float) \
+               P(class, prefix, shot_speed_gain, float) \
+               P(class, prefix, shot_speed_max, float) \
+               P(class, prefix, shot_spread, float) \
+               P(class, prefix, shot_volly, float) \
+               P(class, prefix, shot_volly_refire, float) \
+               P(class, prefix, target_range, float) \
+               P(class, prefix, target_range_min, float) \
+               P(class, prefix, target_range_optimal, float) \
+               P(class, prefix, target_select_anglebias, float) \
+               P(class, prefix, target_select_missilebias, float) \
+               P(class, prefix, target_select_playerbias, float) \
+               P(class, prefix, target_select_rangebias, float) \
+               P(class, prefix, target_select_samebias, float) \
+               P(class, prefix, track_accel_pitch, float) \
+               P(class, prefix, track_accel_rot, float) \
+               P(class, prefix, track_blendrate, float) \
+               P(class, prefix, track_type, float) \
+       END()
+       TR_PROPS(X, Hellion, hellion)
+#undef X
+
 ENDCLASS(Hellion)
 REGISTER_TURRET(HELLION, NEW(Hellion));
index 639924fc47dfcda628df6935e30cbec7839305d1..c60d0f5fbc7d6d2a5592daf9f254283a23affec3 100644 (file)
@@ -14,5 +14,46 @@ CLASS(HunterKiller, Turret)
 /* netname    */ ATTRIB(HunterKiller, netname, string, "hk");
 /* fullname   */ ATTRIB(HunterKiller, turret_name, string, _("Hunter-Killer Turret"));
     ATTRIB(HunterKiller, m_weapon, Weapon, WEP_HK);
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, aim_firetolerance_dist, float) \
+               P(class, prefix, aim_maxpitch, float) \
+               P(class, prefix, aim_maxrot, float) \
+               P(class, prefix, aim_speed, float) \
+               P(class, prefix, ammo, float) \
+               P(class, prefix, ammo_max, float) \
+               P(class, prefix, ammo_recharge, float) \
+               P(class, prefix, health, float) \
+               P(class, prefix, respawntime, float) \
+               P(class, prefix, shot_dmg, float) \
+               P(class, prefix, shot_force, float) \
+               P(class, prefix, shot_radius, float) \
+               P(class, prefix, shot_refire, float) \
+               P(class, prefix, shot_speed, float) \
+               P(class, prefix, shot_speed_accel, float) \
+               P(class, prefix, shot_speed_accel2, float) \
+               P(class, prefix, shot_speed_decel, float) \
+               P(class, prefix, shot_speed_max, float) \
+               P(class, prefix, shot_speed_turnrate, float) \
+               P(class, prefix, shot_spread, float) \
+               P(class, prefix, shot_volly, float) \
+               P(class, prefix, shot_volly_refire, float) \
+               P(class, prefix, target_range, float) \
+               P(class, prefix, target_range_min, float) \
+               P(class, prefix, target_range_optimal, float) \
+               P(class, prefix, target_select_anglebias, float) \
+               P(class, prefix, target_select_missilebias, float) \
+               P(class, prefix, target_select_playerbias, float) \
+               P(class, prefix, target_select_rangebias, float) \
+               P(class, prefix, target_select_samebias, float) \
+               P(class, prefix, track_accel_pitch, float) \
+               P(class, prefix, track_accel_rot, float) \
+               P(class, prefix, track_blendrate, float) \
+               P(class, prefix, track_type, float) \
+       END()
+       TR_PROPS(X, HunterKiller, hk)
+#undef X
+
 ENDCLASS(HunterKiller)
 REGISTER_TURRET(HK, NEW(HunterKiller));
index c4a6066b3b49a43b95365edcf60519b2915dde82..a6d9507990582879f210dadf6b04718bacee6f01 100644 (file)
@@ -12,5 +12,41 @@ CLASS(MachineGunTurret, Turret)
 /* netname    */ ATTRIB(MachineGunTurret, netname, string, "machinegun");
 /* fullname   */ ATTRIB(MachineGunTurret, turret_name, string, _("Machinegun Turret"));
     ATTRIB(MachineGunTurret, m_weapon, Weapon, WEP_TUR_MACHINEGUN);
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, aim_firetolerance_dist, float) \
+               P(class, prefix, aim_maxpitch, float) \
+               P(class, prefix, aim_maxrot, float) \
+               P(class, prefix, aim_speed, float) \
+               P(class, prefix, ammo, float) \
+               P(class, prefix, ammo_max, float) \
+               P(class, prefix, ammo_recharge, float) \
+               P(class, prefix, health, float) \
+               P(class, prefix, respawntime, float) \
+               P(class, prefix, shot_dmg, float) \
+               P(class, prefix, shot_force, float) \
+               P(class, prefix, shot_radius, float) \
+               P(class, prefix, shot_refire, float) \
+               P(class, prefix, shot_speed, float) \
+               P(class, prefix, shot_spread, float) \
+               P(class, prefix, shot_volly, float) \
+               P(class, prefix, shot_volly_refire, float) \
+               P(class, prefix, target_range, float) \
+               P(class, prefix, target_range_min, float) \
+               P(class, prefix, target_range_optimal, float) \
+               P(class, prefix, target_select_anglebias, float) \
+               P(class, prefix, target_select_missilebias, float) \
+               P(class, prefix, target_select_playerbias, float) \
+               P(class, prefix, target_select_rangebias, float) \
+               P(class, prefix, target_select_samebias, float) \
+               P(class, prefix, track_accel_pitch, float) \
+               P(class, prefix, track_accel_rot, float) \
+               P(class, prefix, track_blendrate, float) \
+               P(class, prefix, track_type, float) \
+       END()
+       TR_PROPS(X, MachineGunTurret, machinegun)
+#undef X
+
 ENDCLASS(MachineGunTurret)
 REGISTER_TURRET(MACHINEGUN, NEW(MachineGunTurret));
index 7e0bccf224a40adefd9b2bee93c4a8687a910e17..78c1f76e081d4ac60597ecaaa1f469141d72eb5c 100644 (file)
@@ -12,5 +12,41 @@ CLASS(MLRSTurret, Turret)
 /* netname    */ ATTRIB(MLRSTurret, netname, string, "mlrs");
 /* fullname   */ ATTRIB(MLRSTurret, turret_name, string, _("MLRS Turret"));
     ATTRIB(MLRSTurret, m_weapon, Weapon, WEP_TUR_MLRS);
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, aim_firetolerance_dist, float) \
+               P(class, prefix, aim_maxpitch, float) \
+               P(class, prefix, aim_maxrot, float) \
+               P(class, prefix, aim_speed, float) \
+               P(class, prefix, ammo, float) \
+               P(class, prefix, ammo_max, float) \
+               P(class, prefix, ammo_recharge, float) \
+               P(class, prefix, health, float) \
+               P(class, prefix, respawntime, float) \
+               P(class, prefix, shot_dmg, float) \
+               P(class, prefix, shot_force, float) \
+               P(class, prefix, shot_radius, float) \
+               P(class, prefix, shot_refire, float) \
+               P(class, prefix, shot_speed, float) \
+               P(class, prefix, shot_spread, float) \
+               P(class, prefix, shot_volly, float) \
+               P(class, prefix, shot_volly_refire, float) \
+               P(class, prefix, target_range, float) \
+               P(class, prefix, target_range_min, float) \
+               P(class, prefix, target_range_optimal, float) \
+               P(class, prefix, target_select_anglebias, float) \
+               P(class, prefix, target_select_missilebias, float) \
+               P(class, prefix, target_select_playerbias, float) \
+               P(class, prefix, target_select_rangebias, float) \
+               P(class, prefix, target_select_samebias, float) \
+               P(class, prefix, track_accel_pitch, float) \
+               P(class, prefix, track_accel_rot, float) \
+               P(class, prefix, track_blendrate, float) \
+               P(class, prefix, track_type, float) \
+       END()
+       TR_PROPS(X, MLRSTurret, mlrs)
+#undef X
+
 ENDCLASS(MLRSTurret)
 REGISTER_TURRET(MLRS, NEW(MLRSTurret));
index 887a11a9e726741dd533fcd56888d0f69ca3d385..538b62f2140a7c92bcfe2e59dad0a79154bbf104 100644 (file)
@@ -12,5 +12,41 @@ CLASS(PhaserTurret, Turret)
 /* netname    */ ATTRIB(PhaserTurret, netname, string, "phaser");
 /* fullname   */ ATTRIB(PhaserTurret, turret_name, string, _("Phaser Cannon"));
     ATTRIB(PhaserTurret, m_weapon, Weapon, WEP_PHASER);
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, aim_firetolerance_dist, float) \
+               P(class, prefix, aim_maxpitch, float) \
+               P(class, prefix, aim_maxrot, float) \
+               P(class, prefix, aim_speed, float) \
+               P(class, prefix, ammo, float) \
+               P(class, prefix, ammo_max, float) \
+               P(class, prefix, ammo_recharge, float) \
+               P(class, prefix, health, float) \
+               P(class, prefix, respawntime, float) \
+               P(class, prefix, shot_dmg, float) \
+               P(class, prefix, shot_force, float) \
+               P(class, prefix, shot_radius, float) \
+               P(class, prefix, shot_refire, float) \
+               P(class, prefix, shot_speed, float) \
+               P(class, prefix, shot_spread, float) \
+               P(class, prefix, shot_volly, float) \
+               P(class, prefix, shot_volly_refire, float) \
+               P(class, prefix, target_range, float) \
+               P(class, prefix, target_range_min, float) \
+               P(class, prefix, target_range_optimal, float) \
+               P(class, prefix, target_select_anglebias, float) \
+               P(class, prefix, target_select_missilebias, float) \
+               P(class, prefix, target_select_playerbias, float) \
+               P(class, prefix, target_select_rangebias, float) \
+               P(class, prefix, target_select_samebias, float) \
+               P(class, prefix, track_accel_pitch, float) \
+               P(class, prefix, track_accel_rot, float) \
+               P(class, prefix, track_blendrate, float) \
+               P(class, prefix, track_type, float) \
+       END()
+       TR_PROPS(X, PhaserTurret, phaser)
+#undef X
+
 ENDCLASS(PhaserTurret)
 REGISTER_TURRET(PHASER, NEW(PhaserTurret));
index f15ecfc897478799aed451b63e0fe52fd4cc4916..a6be4dd7e389e4c54d81b1be52a01f3e7777f506 100644 (file)
@@ -12,5 +12,41 @@ CLASS(PlasmaTurret, Turret)
 /* netname    */ ATTRIB(PlasmaTurret, netname, string, "plasma");
 /* fullname   */ ATTRIB(PlasmaTurret, turret_name, string, _("Plasma Cannon"));
     ATTRIB(PlasmaTurret, m_weapon, Weapon, WEP_PLASMA);
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, aim_firetolerance_dist, float) \
+               P(class, prefix, aim_maxpitch, float) \
+               P(class, prefix, aim_maxrot, float) \
+               P(class, prefix, aim_speed, float) \
+               P(class, prefix, ammo, float) \
+               P(class, prefix, ammo_max, float) \
+               P(class, prefix, ammo_recharge, float) \
+               P(class, prefix, health, float) \
+               P(class, prefix, respawntime, float) \
+               P(class, prefix, shot_dmg, float) \
+               P(class, prefix, shot_force, float) \
+               P(class, prefix, shot_radius, float) \
+               P(class, prefix, shot_refire, float) \
+               P(class, prefix, shot_speed, float) \
+               P(class, prefix, shot_spread, float) \
+               P(class, prefix, shot_volly, float) \
+               P(class, prefix, shot_volly_refire, float) \
+               P(class, prefix, target_range, float) \
+               P(class, prefix, target_range_min, float) \
+               P(class, prefix, target_range_optimal, float) \
+               P(class, prefix, target_select_anglebias, float) \
+               P(class, prefix, target_select_missilebias, float) \
+               P(class, prefix, target_select_playerbias, float) \
+               P(class, prefix, target_select_rangebias, float) \
+               P(class, prefix, target_select_samebias, float) \
+               P(class, prefix, track_accel_pitch, float) \
+               P(class, prefix, track_accel_rot, float) \
+               P(class, prefix, track_blendrate, float) \
+               P(class, prefix, track_type, float) \
+       END()
+       TR_PROPS(X, PlasmaTurret, plasma)
+#undef X
+
 ENDCLASS(PlasmaTurret)
 REGISTER_TURRET(PLASMA, NEW(PlasmaTurret));
index 6fdfd32e70cd51c05a1fa6a8a067c7a9d60b8905..e444056c9f663d7b77f78dc4b0ec6f00dabcceb6 100644 (file)
@@ -19,5 +19,41 @@ CLASS(DualPlasmaTurret, PlasmaTurret)
 /* netname    */ ATTRIB(DualPlasmaTurret, netname, string, "plasma_dual");
 /* fullname   */ ATTRIB(DualPlasmaTurret, turret_name, string, _("Dual Plasma Cannon"));
     ATTRIB(DualPlasmaTurret, m_weapon, Weapon, WEP_PLASMA_DUAL);
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, aim_firetolerance_dist, float) \
+               P(class, prefix, aim_maxpitch, float) \
+               P(class, prefix, aim_maxrot, float) \
+               P(class, prefix, aim_speed, float) \
+               P(class, prefix, ammo, float) \
+               P(class, prefix, ammo_max, float) \
+               P(class, prefix, ammo_recharge, float) \
+               P(class, prefix, health, float) \
+               P(class, prefix, respawntime, float) \
+               P(class, prefix, shot_dmg, float) \
+               P(class, prefix, shot_force, float) \
+               P(class, prefix, shot_radius, float) \
+               P(class, prefix, shot_refire, float) \
+               P(class, prefix, shot_speed, float) \
+               P(class, prefix, shot_spread, float) \
+               P(class, prefix, shot_volly, float) \
+               P(class, prefix, shot_volly_refire, float) \
+               P(class, prefix, target_range, float) \
+               P(class, prefix, target_range_min, float) \
+               P(class, prefix, target_range_optimal, float) \
+               P(class, prefix, target_select_anglebias, float) \
+               P(class, prefix, target_select_missilebias, float) \
+               P(class, prefix, target_select_playerbias, float) \
+               P(class, prefix, target_select_rangebias, float) \
+               P(class, prefix, target_select_samebias, float) \
+               P(class, prefix, track_accel_pitch, float) \
+               P(class, prefix, track_accel_rot, float) \
+               P(class, prefix, track_blendrate, float) \
+               P(class, prefix, track_type, float) \
+       END()
+       TR_PROPS(X, DualPlasmaTurret, plasma_dual)
+#undef X
+
 ENDCLASS(DualPlasmaTurret)
 REGISTER_TURRET(PLASMA_DUAL, NEW(DualPlasmaTurret));
index ee3192eb9fac339bf03a9887b0d9dacba6aeec29..02b0d4af2c4da654ce2601e9cc0ee2ae4ee5e319 100644 (file)
@@ -12,5 +12,41 @@ CLASS(TeslaCoil, Turret)
 /* netname    */ ATTRIB(TeslaCoil, netname, string, "tesla");
 /* fullname   */ ATTRIB(TeslaCoil, turret_name, string, _("Tesla Coil"));
     ATTRIB(TeslaCoil, m_weapon, Weapon, WEP_TESLA);
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, aim_firetolerance_dist, float) \
+               P(class, prefix, aim_maxpitch, float) \
+               P(class, prefix, aim_maxrot, float) \
+               P(class, prefix, aim_speed, float) \
+               P(class, prefix, ammo, float) \
+               P(class, prefix, ammo_max, float) \
+               P(class, prefix, ammo_recharge, float) \
+               P(class, prefix, health, float) \
+               P(class, prefix, respawntime, float) \
+               P(class, prefix, shot_dmg, float) \
+               P(class, prefix, shot_force, float) \
+               P(class, prefix, shot_radius, float) \
+               P(class, prefix, shot_refire, float) \
+               P(class, prefix, shot_speed, float) \
+               P(class, prefix, shot_spread, float) \
+               P(class, prefix, shot_volly, float) \
+               P(class, prefix, shot_volly_refire, float) \
+               P(class, prefix, target_range, float) \
+               P(class, prefix, target_range_min, float) \
+               P(class, prefix, target_range_optimal, float) \
+               P(class, prefix, target_select_anglebias, float) \
+               P(class, prefix, target_select_missilebias, float) \
+               P(class, prefix, target_select_playerbias, float) \
+               P(class, prefix, target_select_rangebias, float) \
+               P(class, prefix, target_select_samebias, float) \
+               P(class, prefix, track_accel_pitch, float) \
+               P(class, prefix, track_accel_rot, float) \
+               P(class, prefix, track_blendrate, float) \
+               P(class, prefix, track_type, float) \
+       END()
+       TR_PROPS(X, TeslaCoil, tesla)
+#undef X
+
 ENDCLASS(TeslaCoil)
 REGISTER_TURRET(TESLA, NEW(TeslaCoil));
index 1c923cad7801b97352263dd2c7deda320da7b9a0..ce2023dc17fa8940dc6d7683255ad6e670f664a6 100644 (file)
@@ -14,5 +14,63 @@ CLASS(WalkerTurret, Turret)
 /* netname    */ ATTRIB(WalkerTurret, netname, string, "walker");
 /* fullname   */ ATTRIB(WalkerTurret, turret_name, string, _("Walker Turret"));
     ATTRIB(WalkerTurret, m_weapon, Weapon, WEP_WALKER);
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, aim_firetolerance_dist, float) \
+               P(class, prefix, aim_maxpitch, float) \
+               P(class, prefix, aim_maxrot, float) \
+               P(class, prefix, aim_speed, float) \
+               P(class, prefix, ammo, float) \
+               P(class, prefix, ammo_max, float) \
+               P(class, prefix, ammo_recharge, float) \
+               P(class, prefix, health, float) \
+               P(class, prefix, melee_damage, float) \
+               P(class, prefix, melee_force, float) \
+               P(class, prefix, melee_range, float) \
+               P(class, prefix, respawntime, float) \
+               P(class, prefix, rocket_damage, float) \
+               P(class, prefix, rocket_force, float) \
+               P(class, prefix, rocket_radius, float) \
+               P(class, prefix, rocket_range, float) \
+               P(class, prefix, rocket_range_min, float) \
+               P(class, prefix, rocket_refire, float) \
+               P(class, prefix, rocket_speed, float) \
+               P(class, prefix, rocket_turnrate, float) \
+               P(class, prefix, shot_dmg, float) \
+               P(class, prefix, shot_force, float) \
+               P(class, prefix, shot_radius, float) \
+               P(class, prefix, shot_refire, float) \
+               P(class, prefix, shot_speed, float) \
+               P(class, prefix, shot_spread, float) \
+               P(class, prefix, shot_volly, float) \
+               P(class, prefix, shot_volly_refire, float) \
+               P(class, prefix, speed_jump, float) \
+               P(class, prefix, speed_roam, float) \
+               P(class, prefix, speed_run, float) \
+               P(class, prefix, speed_stop, float) \
+               P(class, prefix, speed_swim, float) \
+               P(class, prefix, speed_walk, float) \
+               P(class, prefix, target_range, float) \
+               P(class, prefix, target_range_min, float) \
+               P(class, prefix, target_range_optimal, float) \
+               P(class, prefix, target_select_anglebias, float) \
+               P(class, prefix, target_select_missilebias, float) \
+               P(class, prefix, target_select_playerbias, float) \
+               P(class, prefix, target_select_rangebias, float) \
+               P(class, prefix, target_select_samebias, float) \
+               P(class, prefix, track_accel_pitch, float) \
+               P(class, prefix, track_accel_rot, float) \
+               P(class, prefix, track_blendrate, float) \
+               P(class, prefix, track_type, float) \
+               P(class, prefix, turn, float) \
+               P(class, prefix, turn_run, float) \
+               P(class, prefix, turn_strafe, float) \
+               P(class, prefix, turn_swim, float) \
+               P(class, prefix, turn_walk, float) \
+       END()
+       TR_PROPS(X, WalkerTurret, walker)
+#undef X
+
 ENDCLASS(WalkerTurret)
 REGISTER_TURRET(WALKER, NEW(WalkerTurret));