]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/vehicles/vehicle/bumblebee.qc
Weapons: store switchweapon as direct weapon reference
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / vehicles / vehicle / bumblebee.qc
index 244b4e2f6126e7fbabf9ca5533b4e24405618332..f279e9e2a27f90e701a5fcf97ac13731f53c6e6e 100644 (file)
@@ -261,7 +261,7 @@ void bumblebee_gunner_exit(int _exitflag)
        player.event_damage   = PlayerDamage;
        player.hud            = HUD_NORMAL;
        player.teleportable       = TELEPORT_NORMAL;
-       player.switchweapon   = gunner.switchweapon;
+       PS(player).m_switchweapon = gunner.m_switchweapon;
        player.vehicle_enter_delay = time + 2;
 
        fixedmakevectors(vehic.angles);
@@ -330,7 +330,7 @@ bool bumblebee_gunner_enter()
 
        RemoveGrapplingHook(player);
 
-       gunner.switchweapon = player.switchweapon;
+       gunner.m_switchweapon = PS(player).m_switchweapon;
        gunner.vehicle_exit = bumblebee_gunner_exit;
        gunner.vehicle_hudmodel.viewmodelforclient = player;