X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fvehicles%2Fvehicle%2Fspiderbot.qc;h=ccc509c6bca9f7f2c5b76933ae6d408f487c78a1;hb=707ef9331a9405bbf266ab5aa3a87a175cad8d8f;hp=fcdd638b38e1c20fff54b81161288bc9fd78907f;hpb=4bf759765406e3ab5586e125919976239ecdacd7;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/vehicles/vehicle/spiderbot.qc b/qcsrc/common/vehicles/vehicle/spiderbot.qc index fcdd638b3..ccc509c6b 100644 --- a/qcsrc/common/vehicles/vehicle/spiderbot.qc +++ b/qcsrc/common/vehicles/vehicle/spiderbot.qc @@ -60,7 +60,11 @@ bool spiderbot_frame(entity this, float dt) PHYS_INPUT_BUTTON_ZOOM(this) = false; PHYS_INPUT_BUTTON_CROUCH(this) = false; - PS(this).m_switchweapon = WEP_Null; + for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot) + { + .entity weaponentity = weaponentities[slot]; + this.(weaponentity).m_switchweapon = WEP_Null; + } this.vehicle_weapon2mode = vehic.vehicle_weapon2mode; @@ -72,15 +76,15 @@ bool spiderbot_frame(entity this, float dt) vf += v_forward; ad = ad * 0.5; v_forward = vf * 0.5; - traceline(ad, ad + v_forward * MAX_SHOT_DISTANCE, MOVE_NORMAL, vehic); + traceline(ad, ad + v_forward * max_shot_distance, MOVE_NORMAL, vehic); UpdateAuxiliaryXhair(this, trace_endpos, ('1 0 0' * this.vehicle_reload1) + ('0 1 0' * (1 - this.vehicle_reload1)), 0); #else vector ad = gettaginfo(vehic.gun1, gettagindex(vehic.gun1, "barrels")); - traceline(ad, ad + v_forward * MAX_SHOT_DISTANCE, MOVE_NORMAL, vehic); + traceline(ad, ad + v_forward * max_shot_distance, MOVE_NORMAL, vehic); UpdateAuxiliaryXhair(this, trace_endpos, ('1 0 0' * this.vehicle_reload1) + ('0 1 0' * (1 - this.vehicle_reload1)), 0); vector vf = ad; ad = gettaginfo(vehic.gun2, gettagindex(vehic.gun2, "barrels")); - traceline(ad, ad + v_forward * MAX_SHOT_DISTANCE, MOVE_NORMAL, vehic); + traceline(ad, ad + v_forward * max_shot_distance, MOVE_NORMAL, vehic); UpdateAuxiliaryXhair(this, trace_endpos, ('1 0 0' * this.vehicle_reload1) + ('0 1 0' * (1 - this.vehicle_reload1)), 1); ad = 0.5 * (ad + vf); #endif @@ -260,7 +264,8 @@ bool spiderbot_frame(entity this, float dt) v_forward = normalize(v_forward); v += v_forward * 50; - fireBullet(this, v, v_forward, autocvar_g_vehicle_spiderbot_minigun_spread, autocvar_g_vehicle_spiderbot_minigun_solidpenetration, + .entity weaponentity = weaponentities[0]; // TODO: unhardcode + fireBullet(this, weaponentity, v, v_forward, autocvar_g_vehicle_spiderbot_minigun_spread, autocvar_g_vehicle_spiderbot_minigun_solidpenetration, autocvar_g_vehicle_spiderbot_minigun_damage, autocvar_g_vehicle_spiderbot_minigun_force, DEATH_VH_SPID_MINIGUN.m_id, 0); sound (gun, CH_WEAPON_A, SND_UZI_FIRE, VOL_BASE, ATTEN_NORM); @@ -603,8 +608,8 @@ METHOD(Spiderbot, vr_setup, void(Spiderbot thisveh, entity instance)) #endif // SVQC #ifdef CSQC -float autocvar_cl_vehicle_spiderbot_cross_alpha = 0.6; -float autocvar_cl_vehicle_spiderbot_cross_size = 1; +//float autocvar_cl_vehicle_spiderbot_cross_alpha = 0.6; +//float autocvar_cl_vehicle_spiderbot_cross_size = 1; METHOD(Spiderbot, vr_hud, void(Spiderbot thisveh)) {