Skip to content

Commit

Permalink
Merge pull request #3572 from X0-11/vehicles-please
Browse files Browse the repository at this point in the history
Vehicle Gun Spawning Fix
  • Loading branch information
BDpuffy420 authored Nov 3, 2024
2 parents e90c2ed + 223f9e9 commit 74c337f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions code/modules/halo/vehicles/vehicle_component_profiles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,13 @@
/datum/component_profile/proc/give_gunner_weapons(var/obj/vehicles/source_vehicle)
var/list/gunners = source_vehicle.get_occupants_in_position(pos_to_check)
for(var/mob/living/carbon/human/gunner in gunners)
if(gunner.get_active_hand() || gunner.get_inactive_hand()) //Let's not give anyone a gun if they're messing with their inventory, or already have a gun.
continue
var/obj/item/weapon/gun/vehicle_turret/weapon = gunner_weapons[gunners.Find(gunner)]
if(isnull(weapon))
continue
weapon = new weapon(source_vehicle)
if(istype(gunner.get_active_hand(),weapon) || istype(gunner.get_inactive_hand(),weapon)) //If they have vehicle gun in their hand(s), let's not bother.
qdel(weapon)
continue
gunner.put_in_hands(weapon)
source_vehicle.update_user_view(gunner,1)
spawn(1)
Expand Down
3 changes: 1 addition & 2 deletions code/modules/halo/vehicles/vehicle_occupant.dm
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@
return null

/obj/vehicles/proc/enter_as_position(var/mob/user,var/position = "passenger",var/forced_by_faction = null)
if(!is_processing)
START_PROCESSING(SSobj,src)
START_PROCESSING(SSobj, src)
var/driver_faction = get_driver_faction()
var/faction_use = user.faction
if(forced_by_faction && forced_by_faction != "neutral")
Expand Down

0 comments on commit 74c337f

Please sign in to comment.