X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fvehicles%2Fvehicle%2Fbumblebee.qc;h=7bc10b4ecd2b31bb0a1bcae4e75c905fa309688d;hb=9755de88ca66529c0efa49b24c50de94e6a013f5;hp=9f718e34b98a1ec28f22a8c01acf60970468ba85;hpb=641c47df604de42c11c68a7d80813b29affcefb2;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/vehicles/vehicle/bumblebee.qc b/qcsrc/common/vehicles/vehicle/bumblebee.qc index 9f718e34b..7bc10b4ec 100644 --- a/qcsrc/common/vehicles/vehicle/bumblebee.qc +++ b/qcsrc/common/vehicles/vehicle/bumblebee.qc @@ -1,34 +1,5 @@ -#ifndef VEHICLE_BUMBLEBEE -#define VEHICLE_BUMBLEBEE #include "bumblebee.qh" -#include "bumblebee_weapons.qh" - -CLASS(Bumblebee, Vehicle) -/* spawnflags */ ATTRIB(Bumblebee, spawnflags, int, VHF_DMGSHAKE); -/* mins */ ATTRIB(Bumblebee, mins, vector, '-245 -130 -130'); -/* maxs */ ATTRIB(Bumblebee, maxs, vector, '230 130 130'); -/* view offset*/ ATTRIB(Bumblebee, view_ofs, vector, '0 0 300'); -/* view dist */ ATTRIB(Bumblebee, height, float, 450); -/* model */ ATTRIB(Bumblebee, mdl, string, "models/vehicles/bumblebee_body.dpm"); -/* model */ ATTRIB(Bumblebee, model, string, "models/vehicles/bumblebee_body.dpm"); -/* head_model */ ATTRIB(Bumblebee, head_model, string, ""); -/* hud_model */ ATTRIB(Bumblebee, hud_model, string, "models/vehicles/spiderbot_cockpit.dpm"); -/* tags */ ATTRIB(Bumblebee, tag_head, string, ""); -/* tags */ ATTRIB(Bumblebee, tag_hud, string, ""); -/* tags */ ATTRIB(Bumblebee, tag_view, string, "tag_viewport"); -/* netname */ ATTRIB(Bumblebee, netname, string, "bumblebee"); -/* fullname */ ATTRIB(Bumblebee, vehicle_name, string, _("Bumblebee")); -/* icon */ ATTRIB(Bumblebee, m_icon, string, "vehicle_bumble"); -ENDCLASS(Bumblebee) -REGISTER_VEHICLE(BUMBLEBEE, NEW(Bumblebee)); - -#ifndef MENUQC - MODEL(VEH_BUMBLEBEE_GUNCOCKPIT, "models/vehicles/wakizashi_cockpit.dpm"); -#endif - -#endif - #ifdef IMPLEMENTATION const float BRG_SETUP = 2; @@ -265,7 +236,12 @@ void bumblebee_gunner_exit(entity this, int _exitflag) player.event_damage = PlayerDamage; player.hud = HUD_NORMAL; player.teleportable = TELEPORT_NORMAL; - PS(player).m_switchweapon = gunner.m_switchweapon; + for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot) + { + .entity weaponentity = weaponentities[slot]; + player.(weaponentity).m_switchweapon = gunner.(weaponentity).m_switchweapon; + delete(gunner.(weaponentity)); + } player.vehicle_enter_delay = time + 2; fixedmakevectors(vehic.angles); @@ -333,9 +309,15 @@ bool bumblebee_gunner_enter(entity this, entity player) player.vehicle_energy = vehic.vehicle_energy; UNSET_ONGROUND(player); - RemoveGrapplingHook(player); + RemoveGrapplingHooks(player); + + for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot) + { + .entity weaponentity = weaponentities[slot]; - gunner.m_switchweapon = PS(player).m_switchweapon; + gunner.(weaponentity) = new(temp_wepent); + gunner.(weaponentity).m_switchweapon = player.(weaponentity).m_switchweapon; + } gunner.vehicle_exit = bumblebee_gunner_exit; gunner.vehicle_hudmodel.viewmodelforclient = player; @@ -422,8 +404,9 @@ bool bumblebee_pilot_frame(entity this, float dt) if(intermission_running) { - vehic.velocity = '0 0 0'; - vehic.avelocity = '0 0 0'; + vehic.solid = SOLID_NOT; + vehic.takedamage = DAMAGE_NO; + set_movetype(vehic, MOVETYPE_NONE); return; }