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

SWEP/Initialize does not get called on client sometimes #2732

Closed
mcNuggets1 opened this issue Jul 17, 2016 · 9 comments
Closed

SWEP/Initialize does not get called on client sometimes #2732

mcNuggets1 opened this issue Jul 17, 2016 · 9 comments
Labels
Cannot confirm The issue cannot be confirmed by the developers.

Comments

@mcNuggets1
Copy link

If you spawn a SWEP with the toolgun, Initialize does not get called.

Does happen too, if you give yourself a weapon serverside with the meta:Give function.

@Kefta
Copy link
Contributor

Kefta commented Jul 17, 2016

Yes! Had to work around this in my weapon base by making a SWEP variable track when it was initialised, and if it was not on deploy, initialise it.

@mcNuggets1
Copy link
Author

I am a noob coder (almost). I wish I had this sort of workaround.
My weapon base is screwed due to this. (Broken ironsights etc)

@Kefta
Copy link
Contributor

Kefta commented Aug 12, 2016

It's not hard to fix in the Lua state. There's tons of bugs on this GitHub, many game breaking that take higher precedent.

@sigmasoldi3r
Copy link

updates?

@WilliamVenner
Copy link

Even toolgun tools are affected by this

@thegrb93
Copy link

Never seen this happen

@sigmasoldi3r
Copy link

my gah! 2020 still open, didn't even remember this issue :I

@robotboy655 robotboy655 added the Cannot confirm The issue cannot be confirmed by the developers. label Oct 20, 2020
@robotboy655
Copy link
Contributor

robotboy655 commented Oct 20, 2020

Simply cannot reproduce with any of the methods mentioned.

I can make it happen if I spawn a SWEP under my feet while already having the gun, in which case it would get instantly deleted so as far as the client goes, it never existed in the first place, which is the correct behavior.

If you are interested in the code used for testing, it's literally this:

function SWEP:Initialize()
print("Initialize", CurTime() )
	self:SetHoldType( "smg" )

end

in weapon_flechettegun.lua

@mcNuggets1
Copy link
Author

It happened a long time ago.
It was fixed a long time ago, atleast i couldnt ever reproduce it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cannot confirm The issue cannot be confirmed by the developers.
Projects
None yet
Development

No branches or pull requests

6 participants