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

NextThink doesn't work for SWEPs #3269

Open
Kefta opened this issue Aug 15, 2017 · 5 comments
Open

NextThink doesn't work for SWEPs #3269

Kefta opened this issue Aug 15, 2017 · 5 comments
Labels
Can't/Won't fix The issue cannot or will not be fixed.

Comments

@Kefta
Copy link
Contributor

Kefta commented Aug 15, 2017

Test code:

function SWEP:Think()
	local flCurTime = CurTime()
	print("Thinking", flCurTime)
	
	flCurTime = flCurTime + 10
	self:NextThink(flCurTime)
	
	if (CLIENT) then
		self:SetNextClientThink(flCurTime)
	end
	
	return true
end
@eLeCtrOssSnake
Copy link

"Fixed". Yea sure

@robotboy655
Copy link
Contributor

robotboy655 commented Aug 20, 2018

I am fairly certain this is due to the fact that the Think hook for SWEPs is not actually a think function in engine, it is called from ItemPostFrame and SingleplayerThink (OnNewUserCmd) neither of which are or will be affected by NextThink.

@robotboy655 robotboy655 added the Can't/Won't fix The issue cannot or will not be fixed. label Aug 20, 2018
@Greenhourglass
Copy link

Shouldn't there be a new alternative Think hook for SWEPs then so people can still use NextThink?

@Kefta
Copy link
Contributor Author

Kefta commented Sep 3, 2018

You can already implement one yourself in Lua.

@eLeCtrOssSnake
Copy link

btw nice fix. Facepuch says: "we will not fix it".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Can't/Won't fix The issue cannot or will not be fixed.
Projects
None yet
Development

No branches or pull requests

4 participants