Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vehicle Gun Spawning Fix #3572

Merged
merged 1 commit into from
Nov 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading