]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/turrets/sv_turrets.qh
take3: format 903 files
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / turrets / sv_turrets.qh
index 41a7bd962dc6e8a19ffcef03eb4291db7e55ed29..9fae21bca982afb991c2c55f421fdbe7f10fc9ea 100644 (file)
@@ -9,26 +9,26 @@ bool turret_firecheck(entity this);
 entity turret_select_target(entity this);
 
 // turret fields
-.float ticrate; // interal ai think rate
-.entity tur_head; // top part of the turret
-.entity tur_defend; // defend this entity
-.vector tur_shotorg; // shot origin
-.vector tur_aimpos; // aiming location
-.float tur_impacttime; // predicted projectile impact time
-.entity tur_impactent; // entity the projectile hit
-.float tur_dist_enemy; // distance to enemy
-.float tur_dist_aimpos; // distance to aim location
+.float ticrate;                   // interal ai think rate
+.entity tur_head;                 // top part of the turret
+.entity tur_defend;               // defend this entity
+.vector tur_shotorg;              // shot origin
+.vector tur_aimpos;               // aiming location
+.float tur_impacttime;            // predicted projectile impact time
+.entity tur_impactent;            // entity the projectile hit
+.float tur_dist_enemy;            // distance to enemy
+.float tur_dist_aimpos;           // distance to aim location
 .float tur_dist_impact_to_aimpos; // distance impact<->aim
-.float volly_counter; // decrement counter from .shot_volly to 0
+.float volly_counter;             // decrement counter from .shot_volly to 0
 
-.float shot_refire; // attack refire
-.float shot_speed; // projectile speed
-.float shot_spread; // inaccuracy
-.float shot_dmg; // core damage of projectile
-.float shot_radius; // projectile damage radius
-.float shot_force; // projectile damage force
-.float shot_volly; // smaller than 1 = shoot # times at target
-.float shot_volly_refire; // refire after completed volly
+.float shot_refire;               // attack refire
+.float shot_speed;                // projectile speed
+.float shot_spread;               // inaccuracy
+.float shot_dmg;                  // core damage of projectile
+.float shot_radius;               // projectile damage radius
+.float shot_force;                // projectile damage force
+.float shot_volly;                // smaller than 1 = shoot # times at target
+.float shot_volly_refire;         // refire after completed volly
 
 .float target_range;
 .float target_range_min;
@@ -39,7 +39,7 @@ entity turret_select_target(entity this);
 .float target_select_anglebias;
 .float target_select_missilebias;
 .float target_select_playerbias;
-.float target_select_time; // last time turret had a valid target
+.float target_select_time;   // last time turret had a valid target
 .float target_validate_time; // throttle re-validation of current target
 
 .float aim_firetolerance_dist;
@@ -47,9 +47,9 @@ entity turret_select_target(entity this);
 .float aim_maxpitch;
 .float aim_maxrotate;
 
-.float ammo; // current ammo
+.float ammo;          // current ammo
 .float ammo_recharge; // recharge rate
-.float ammo_max; // maximum ammo
+.float ammo_max;      // maximum ammo
 
 .vector idle_aim;
 
@@ -70,7 +70,7 @@ entity turret_select_target(entity this);
 
 // tracking type
 .float track_type;
-const float TFL_TRACKTYPE_STEPMOTOR = 1; // hard angle increments, ugly for fast turning with best accuracy
+const float TFL_TRACKTYPE_STEPMOTOR = 1;    // hard angle increments, ugly for fast turning with best accuracy
 const float TFL_TRACKTYPE_FLUIDPRECISE = 2; // smooth absolute movement, looks OK with fair accuracy
 const float TFL_TRACKTYPE_FLUIDINERTIA = 3; // simulated inertia ("wobbly" mode), worst accuracy, depends on below flags
 .float track_accel_pitch;
@@ -92,7 +92,7 @@ bool turret_initialize(entity this, Turret tur);
 /// Function to use for target evaluation. usualy turret_targetscore_generic
 .float(entity _turret, entity _target) turret_score_target;
 
-.bool(entity this, entity e_target,entity e_sender) turret_addtarget;
+.bool(entity this, entity e_target, entity e_sender) turret_addtarget;
 
 .entity pathcurrent;
 
@@ -102,22 +102,22 @@ float turret_count;
 
 // debugging
 // Uncomment below to enable various debug output.
-//#define TURRET_DEBUG
-//#define TURRET_DEBUG_TARGETVALIDATE
-//#define TURRET_DEBUG_TARGETSELECT
+// #define TURRET_DEBUG
+// #define TURRET_DEBUG_TARGETVALIDATE
+// #define TURRET_DEBUG_TARGETSELECT
 #ifdef TURRET_DEBUG
 .float tur_debug_dmg_t_h; // total damage that hit something (can be more than tur_debug_dmg_t_f since it should count radius damage)
 .float tur_debug_dmg_t_f; // total damage
-.float tur_debug_start; // turret initialization time
-.float tur_debug_tmr1; // random timer
-.float tur_debug_tmr2; // random timer
-.float tur_debug_tmr3; // random timer
-.vector tur_debug_rvec; // random vector
+.float tur_debug_start;   // turret initialization time
+.float tur_debug_tmr1;    // random timer
+.float tur_debug_tmr2;    // random timer
+.float tur_debug_tmr3;    // random timer
+.vector tur_debug_rvec;   // random vector
 #endif
 
 // aiming
 vector tvt_thadv; // turret head angle diff vector, updated by a successful call to turret_validate_target
-vector tvt_tadv; // turret angle diff vector, updated by a successful call to turret_validate_target
-float tvt_thadf; // turret head angle diff float, updated by a successful call to turret_validate_target
-float tvt_tadf; // turret angle diff float, updated by a successful call to turret_validate_target
-float tvt_dist; // turret distance, updated by a successful call to turret_validate_target
+vector tvt_tadv;  // turret angle diff vector, updated by a successful call to turret_validate_target
+float tvt_thadf;  // turret head angle diff float, updated by a successful call to turret_validate_target
+float tvt_tadf;   // turret angle diff float, updated by a successful call to turret_validate_target
+float tvt_dist;   // turret distance, updated by a successful call to turret_validate_target