Walk through walls
1 Attachment(s)
Walk through walls A plugin that allows you to walk throught walls. Changelog (Suggested by HamletEagle)
Cvars
|
Re: Walk trought walls
Nice plugin. ;)
By the way, may you explain more? What do you mean by "Distance from player, used for maximum wall width." and "Maximum fall height as you go through wall." as I'm quite confused. |
Re: Walk trought walls
noclip?
|
Re: Walk trought walls
It is different from noclip. ;)
|
Re: Walk trought walls
Distance from player for wall width:
A = Player | = Wall B = Distance from player A | B Actualy its just the max wall width +40.0 I may should make that cvar easyer in next version ;) |
Re: Walk trought walls
Nice job.
|
Re: Walk trought walls
Thank you for the explanation, Xalus. ;)
|
Re: Walk trough walls
Code looks good, except:
1.Drop the stock keyword in front of your functions. 2.Cvar caching is not needed here, you are not working in a forward called per frame. 3.Considering above, nothing should be static. 4.Add cvars description inside the source file or any other relevant informations. This way, the owner could easy find what he needs, without searching for the thread. Some feature suggestions: 1.This could become a pain, what if I stand near a wall but I don't want to be teleported ? Add a button, like IN_USE which should be pressend in order to teleport. You can make a cvar to let admins decide if teleportation should be automatic or by a button. 2.You could add messages telling them why the teleportation failed, like wall is too big or stuff. Same, could be adjusted by cvars. 3.Add another cvar for the delay, maybe an owner wants more or less than 0.7. |
Re: Walk through walls
[v1.1]
- Optimized code - And the other suggestions of HamletEagle. |
Re: Walk through walls
Fastly read your code, updates appear to be ok. Just:
1.intCvarButton and tr(from is_hull_vacant) should not be declared as static. static is usefull for example in a forward that's called usually per frame or on big arrays, to avoid going out of the stack size(basically allocating memory only one time). 2.get_pcvar_num(g_cvarMessages) should be cached inside the function because you are calling it more than one time(as you did for g_cvarButton). |
All times are GMT -4. The time now is 19:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.