Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
ewheel_weapon.qc File Reference
#include "ewheel_weapon.qh"
Include dependency graph for ewheel_weapon.qc:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 SOUND (EWheelAttack_FIRE, W_Sound("lasergun_fire"))
void turret_initparams (entity)

Function Documentation

◆ SOUND()

SOUND ( EWheelAttack_FIRE ,
W_Sound("lasergun_fire")  )

◆ turret_initparams()

void turret_initparams ( entity tur)

Definition at line 1217 of file sv_turrets.qc.

1218{
1219 #define TRY(x) (x) ? (x)
1220 tur.respawntime = max (-1, (TRY(tur.respawntime) : 60 ));
1221 tur.shot_refire = bound(0.01, (TRY(tur.shot_refire) : 1 ), 9999);
1222 tur.shot_dmg = max (1, (TRY(tur.shot_dmg) : tur.shot_refire * 50 ));
1223 tur.shot_radius = max (1, (TRY(tur.shot_radius) : tur.shot_dmg * 0.5 ));
1224 tur.shot_speed = max (1, (TRY(tur.shot_speed) : 2500 ));
1225 tur.shot_spread = bound(0.0001, (TRY(tur.shot_spread) : 0.0125 ), 500);
1226 tur.shot_force = bound(0.001, (TRY(tur.shot_force) : tur.shot_dmg * 0.5 + tur.shot_radius * 0.5 ), 5000);
1227 tur.shot_volly = bound(1, (TRY(tur.shot_volly) : 1 ), floor(tur.ammo_max / tur.shot_dmg));
1228 tur.shot_volly_refire = bound(tur.shot_refire, (TRY(tur.shot_volly_refire) : tur.shot_refire * tur.shot_volly ), 60);
1229 tur.target_range = bound(0, (TRY(tur.target_range) : tur.shot_speed * 0.5 ), max_shot_distance);
1230 tur.target_range_min = bound(0, (TRY(tur.target_range_min) : tur.shot_radius * 2 ), max_shot_distance);
1231 tur.target_range_optimal = bound(0, (TRY(tur.target_range_optimal) : tur.target_range * 0.5 ), max_shot_distance);
1232 tur.aim_maxrot = bound(0, (TRY(tur.aim_maxrot) : 90 ), 360);
1233 tur.aim_maxpitch = bound(0, (TRY(tur.aim_maxpitch) : 20 ), 90);
1234 tur.aim_speed = bound(0.1, (TRY(tur.aim_speed) : 36 ), 1000);
1235 tur.aim_firetolerance_dist = bound(0.1, (TRY(tur.aim_firetolerance_dist) : 5 + (tur.shot_radius * 2) ), max_shot_distance);
1236 tur.target_select_rangebias = bound(-10, (TRY(tur.target_select_rangebias) : 1 ), 10);
1237 tur.target_select_samebias = bound(-10, (TRY(tur.target_select_samebias) : 1 ), 10);
1238 tur.target_select_anglebias = bound(-10, (TRY(tur.target_select_anglebias) : 1 ), 10);
1239 tur.target_select_missilebias = bound(-10, (TRY(tur.target_select_missilebias) : 1 ), 10);
1240 tur.target_select_playerbias = bound(-10, (TRY(tur.target_select_playerbias) : 1 ), 10);
1241 tur.ammo_max = max (tur.shot_dmg, (TRY(tur.ammo_max) : tur.shot_dmg * 10 ));
1242 tur.ammo_recharge = max (0, (TRY(tur.ammo_recharge) : tur.shot_dmg * 0.5 ));
1243 #undef TRY
1244}
float bound(float min, float value, float max)
float floor(float f)
float max(float f,...)
#define TRY(x)
int max_shot_distance
Definition weapon.qh:203

References bound(), entity(), floor(), max(), max_shot_distance, and TRY.

Referenced by turret_initialize().