-
Notifications
You must be signed in to change notification settings - Fork 94
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
Fix "fire_bullets" event from erroring. #1350
base: develop
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1462,8 +1462,8 @@ PART.OldEvents = { | |
operator_type = "string", preferred_operator = "find simple", | ||
tutorial_explanation = "fire_bullets supposedly checks what types of bullets you're firing", | ||
arguments = {{find_ammo = "string"}, {time = "number"}}, | ||
callback = function(self, ent, find, time) | ||
time = time or 0.1 | ||
callback = function(self, ent, find_ammo, time) | ||
local time = time or 0.1 | ||
|
||
ent = try_viewmodel(ent) | ||
|
||
|
@@ -3382,10 +3382,6 @@ pac.AddHook("EntityFireBullets", "firebullets", function(ent, data) | |
ent.pac_fire_bullets = {name = data.AmmoType, time = pac.RealTime, reset = true} | ||
|
||
pac.CallRecursiveOnAllParts("OnFireBullets") | ||
|
||
if ent.pac_hide_bullets then | ||
return false | ||
end | ||
Comment on lines
-3385
to
-3388
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Idk if removing this is right. Someone else verify There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At first glance, if we search "pac_hide_bullets", it seemed as though the field isn't created anywhere (so, accessing it would always be nil if that was the case) We still want that return because we still want the option to hide the bullets. But there's some side issues in singleplayer. I tried to test, it appears the EntityFireBullets hook is ineffective. But it's fine with local server and p2p setups for some reason... oh well! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @unknao can you revert this change? |
||
end) | ||
|
||
--for regaining focus on cameras from first person, hacky thing to not loop through localparts every time | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This local isn't needed