Module: Parachute (not fake)
2 Attachment(s)
Because too many people asked for this, I've made this little module.
All users in server has parachute, it activates with E (+use) while in air. It only have one cvar Quote:
* Put parachute.mdl into models folder * Put the module into addons/amxmodx/modules * Enable adding parachute in addons/amxmodx/configs/modules.ini I only have linux build. Anyone willing to compile and test under windows will be helpful. |
Re: Module: Parachute (not fake)
1 Attachment(s)
good
window version here |
Re: Module: Parachute (not fake)
Good job!
|
Re: Module: Parachute (not fake)
Nice joob joropito !
Can you add 2 natives something likes: PHP Code:
Also, Arkshine said on this topic using PlayerPreThink for plugin like parachute is not the very good way. Have you idea how to create parachute without PlayerPreThink functions ? I have tried to make a parachute plugin without PlayerPreThink function, but have a problem with Cache_UnlinkLRU error. |
Re: Module: Parachute (not fake)
Quote:
|
Re: Module: Parachute (not fake)
I have to check if it's smooth to have an entity thinking each 0.1 and adding Z velocity to player. Also I want change the direction to what the player is viewing while flying.
This is just a method copy from the original parachute because lot of people asked to have it in a module. Of course there're some ways to improve this. |
Re: Module: Parachute (not fake)
well .. thank you very much joropito, i will buy you a beer.
|
Re: Module: Parachute (not fake)
You can do it without, and using prethink is fairly overkill for that but there are some issues using others ways, that's why I have not released yet the new parachute plugin.
Anyway, except these unexpected problems where I'm working now to figure out some solution, the way I'm using is the following : - Make the parachute thinking - Hooking it - Doing all the stuffs inside with timer. The purpose is to have a number of actions as less as possible. To do that, you can optimize things, like : - Using +use to trigger only the parachute deployment. Meaning hooking ObjectCaps for the deploy only and not like the original where you need to hold +use. - Using timer to lock the parachute step. Meaning, for example for deploy, the time necessary for the parachute to be fully deployed is > ~2s, so meanwhile this time, the plugin does nothing. - Creating entity on new player only, unattach/hide it when not used, then delete it when the player is disconnected. No need each time to recreate the entity. - Letting the engine making the model animation. You can handle the speed fall differently : - Method 1 : The smoothest, is to let the engine doing the things, by setting the player's gravity only. It means you will fall like a projectile and where you are going to have a constant acceleration. Such setting is largely enough for small maps or maps where you don't jump high, for example. (Parachute thinking set to 1 second, will explain below why) - Method 2 : Smooth, using method 1, but to have a better fall approach, you set some basevelocity on z (and not velocity) each 0.1 second. It's good for all kinf of maps. - Method 3 : Fairly smooth. You set some velocity on z, each 0.1 seconds. It's what does the original parachute plugin, you fall in a straight line in a constant speed. It's good for maps with large high ceiling. About the method 1, I need to use some delay (1 second) to check if the player is on the ground. I've tried to find a forward which could handle such case, and did not find something useful. But it has the advantage to let some delay before the check, so for example, if you fall on someone or on an edge and you jump or keep falling, the parachute is not closed. Some issues I have are : - Some animations problems. It happens randomly. But It might because of my sucking code. - Because the onground check is done after some time, and because by default the player's gravity is changed, if you jump and you are on the ground, you will make a big jump (because of gravity). A double-edge feature but fixing should not be too hard. (Already done more or less) All these shits to say, well, parachute can be done in others ways, something way better. The issues should be fixable. But if joropito is on it, I guess no need to bother with my work anymore. |
Re: Module: Parachute (not fake)
What do you mean with (not fake)?
By the way, it would be better to check whether entity exists through FNullEnt instead of getting the entity's index then check it whether is higher than zero. |
Re: Module: Parachute (not fake)
not fake thing: there was a fake parachute module with slowhack to forward players to some server
FNullEnt: it just check for entity equal to null. I prefer to check for less or equal zero. It's just different opcode, and don't change anything at asm code level. |
Re: Module: Parachute (not fake)
Thanks, I was looking for this some time ago (not fake :))
I will test it. EDIT: Parachute open too late (~2sec). EDIT2: joropito can you recompile with 1sec ? |
Re: Module: Parachute (not fake)
Good job, I will try it.
|
Re: Module: Parachute (not fake)
parachute opens too late....i have same complaints.
Thank you. |
Re: Module: Parachute (not fake)
Quote:
There is a different thing: FNullEnt != 0 checks whether g_engfuncs.pfnEntOffsetOfPEntity is not null. ENTINDEX > 0 checks whether g_engfuncs.pfnIndexOfEdict is higher than zero. By the way, FNullEnt works with entities from -99999999 to 99999999 without crashing server. |
Re: Module: Parachute (not fake)
As others said, parachute opens like 2 seconds late (At least on windows version).
|
Re: Module: Parachute (not fake)
Quote:
|
Re: Module: Parachute (not fake)
I see nobody checked the source code. Yes, the parachute open after you have a minimum fall speed.
Why? Because you can't open the parachute just after you jump! That would be a mess... (in real world xD). Also using this method you can't open parachute when you do a normal jump while running. I will not make a few changes. I will wait to have more interesting requests then I will update the module. |
Re: Module: Parachute (not fake)
Maybe you can add little FOV effect to be more fun ( https://forums.alliedmods.net/showthread.php?t=3674 ), and maybe you can make the legs of player to be before him ( http://hdbox.bg/uclip.php?id=4573 )
|
Re: Module: Parachute (not fake)
No. Changing punchangle or v_angle.
|
Re: Module: Parachute (not fake)
Maybe you can add a cvar to open (or not) the parachute after jump...
|
Re: Module: Parachute (not fake)
Quote:
|
Re: Module: Parachute (not fake)
Bump.
Can you make only 1sec? I don't know how to compile modules. |
Re: Module: Parachute (not fake)
Please fix the delay :(
|
Re: Module: Parachute (not fake)
I was doing some testing cause some people have ask me about this and I found a way without hooking client_prethink. I am also using gravity cause its really smooth and acts more realistic. Would be nice to see this in a module coded like this.
PHP Code:
|
Re: Module: Parachute (not fake)
PM_Move is not better than prethink ;)
And hook prethink in a module is not a problem. |
Re: Module: Parachute (not fake)
1 Attachment(s)
Ok made a new. Really i think this is the best way to do this. Its the most realistic and best performance I think. Please give me feedback on this.
PHP Code:
|
Re: Module: Parachute (not fake)
Why don't you post in plugin parachute thread ?
|
Re: Module: Parachute (not fake)
|
Re: Module: Parachute (not fake)
Quote:
But im done. This was only to improve the parachute plugin without using prethink or cmdstart |
Re: Module: Parachute (not fake)
1 Attachment(s)
Quote:
Code:
sv_fallspeed 100 // fall speed with parachute |
Re: Module: Parachute (not fake)
Is it possible to add a cvar for new parachute model ?
|
Re: Module: Parachute (not fake)
i cant compile
the terminal output tried gcc & g++ PHP Code:
|
Re: Module: Parachute (not fake)
Ahm, it could be done more efficient, maybe with cmdstart..
But arkshine gave me an ideea Hook a command like radio1 to deploy parachute, store player's original gravity ( to avoid bugs on mods such zombie plague where player's have different gravity values ) press again to close the parachute, restore gravity, register touch and when players touches the ground, automaticaly close the parachute |
Re: Module: Parachute (not fake)
If a user isin air with parachute open and that time he dies
Hisbody is stuck in that position and doesn't disappear for a while |
Re: Module: Parachute (not fake)
Quote:
|
Re: Module: Parachute (not fake)
Can someone make this module work with regamedll bots too?
To work with zbots ? |
All times are GMT -4. The time now is 13:16. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.