Raised This Month: $51 Target: $400
 12% 

Gravity API v0.3


Post New Thread Reply   
 
Thread Tools Display Modes
Depresie
Veteran Member
Join Date: Nov 2013
Old 02-07-2016 , 15:27   Re: Gravity API v0.2
Reply With Quote #11

0.5 is not 500, but 400, normal gravity is 800, so 0.5 is 400
__________________
Depresie is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 02-11-2016 , 12:54   Re: Gravity API v0.2
Reply With Quote #12

Quote:
Originally Posted by Craxor View Post
+ You have more natives to manage users gravity ( gravity_api.inc ).
These are fake natives, if you want real natives, go to the AMXX github repository, clone it and implement what is missing, or fix what is broken. But when doing that, respect the current project aspects. Here you can find a example about notepad++ project:
https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/CONTRIBUTING.md#pull-requests

__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective

Last edited by addons_zz; 02-11-2016 at 13:17. Reason: spelling fix
addons_zz is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 02-12-2016 , 08:31   Re: Gravity API v0.2
Reply With Quote #13

Quote:
Originally Posted by KliPPy View Post
How is it broken? You never told or showed us what is broken about it? Tell us and show a code snippet that proves it.
Test and see yourself, i believe i'm wrong, it's not broken just return weird values (0.5, 1.0, etc .. ) Mine return exactly the value you have ( 800, 530, 400.. etc ).

Quote:
Originally Posted by Depresie View Post
0.5 is not 500, but 400, normal gravity is 800, so 0.5 is 400
You're right, sorry!

Quote:
Originally Posted by addons_zz View Post
These are fake natives, if you want real natives, go to the AMXX github repository, clone it and implement what is missing, or fix what is broken. But when doing that, respect the current project aspects. Here you can find a example about notepad++ project:
https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/CONTRIBUTING.md#pull-requests
Yes, fake natives , no .. REAL NATIVES: Maded with C++ (modules) , Fake natives: Maded in plugins, but you're right

About rest of reply, again you're boring with your links.

Update, check changelog ( Added Gravity Save using just natives! )

Last edited by Craxor; 02-12-2016 at 08:33.
Craxor is offline
Send a message via ICQ to Craxor
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 02-12-2016 , 13:36   Re: Gravity API v0.2
Reply With Quote #14

Quote:
Originally Posted by Craxor View Post
again you're boring with your links.
What? I only placed one link, a fu***** awesome link, a real treasure. Whatever you know that, and as it is a good thing, it stays to anyone else which doesn't know. It called share with everybody a special knowledge.
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective

Last edited by addons_zz; 02-12-2016 at 13:39. Reason: spelling fix
addons_zz is offline
Mario AR.
Senior Member
Join Date: May 2011
Location: Lima, Perú
Old 02-12-2016 , 17:27   Re: Gravity API v0.2
Reply With Quote #15

Quote:
Originally Posted by Craxor View Post
Test and see yourself, i believe i'm wrong, it's not broken just return weird values (0.5, 1.0, etc .. ) Mine return exactly the value you have ( 800, 530, 400.. etc ).
Well... they're not exactly "weird values".

0.5 gravity means half (1/2) the gravity set in "sv_gravity" CVAR.
So, the relative gravity of a player with "0.5 gravity", in a server with normal gravity (800) will be 800*0.5 = 400 units/s^2

Your API, basically, acts as a calculator for custom gravities; but an API only for doing that simple thing is not worth, IMO.
Mario AR. is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 02-13-2016 , 01:56   Re: Gravity API v0.2
Reply With Quote #16

Quote:
Originally Posted by Mario AR. View Post
Well... they're not exactly "weird values".

0.5 gravity means half (1/2) the gravity set in "sv_gravity" CVAR.
So, the relative gravity of a player with "0.5 gravity", in a server with normal gravity (800) will be 800*0.5 = 400 units/s^2

Your API, basically, acts as a calculator for custom gravities; but an API only for doing that simple thing is not worth, IMO.
It's usefull: ) Also i add save system for gravity: D
Craxor is offline
Send a message via ICQ to Craxor
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 02-13-2016 , 13:27   Re: Gravity API v0.2
Reply With Quote #17

Quote:
Originally Posted by Craxor View Post
It's usefull: ) Also i add save system for gravity: D
I don't even know how is that useful. Anyway, Mario explained to you what those "weird" values really are, and, in my opinion, it's actually even easier to work with such values. The game itself uses such values for gravity. And also if any other plugin that doesn't use your API changes players' gravity, your API will return incorrect values.

Off-topic: Welcome back Mario, haven't seen you around in a while.
klippy is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 02-14-2016 , 03:16   Re: Gravity API v0.3
Reply With Quote #18

I know what "weird values" are, i just named that, does that mean i don't know what they are.

Don't need to explain i know that.

- About Return Incorect Values, i know that, but why you should use set_player_gravity then you would use get_user_gravity in another plugin? You should use Both functions in the same plugin. I don't see that as an big 'drama'.

@mario: yes, act as an calculator, but also is saves the gravity you gave, and make things work more easy, my opinion is .. It's useful!

Everybody have an opinion and i respect everybody.

Last edited by Craxor; 02-14-2016 at 03:17.
Craxor is offline
Send a message via ICQ to Craxor
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 02-14-2016 , 08:34   Re: Gravity API v0.3
Reply With Quote #19

Quote:
- About Return Incorect Values, i know that, but why you should use set_player_gravity then you would use get_user_gravity in another plugin? You should use Both functions in the same plugin. I don't see that as an big 'drama'.
Think yourself as a regular server owner. He install the plugin X for changing gravity(which uses your "api"), then plugin Y that does stuff based on gravity(and the author used get_user_gravity). A scenario for KliPPy's point.
__________________

Last edited by HamletEagle; 02-14-2016 at 08:35.
HamletEagle is online now
Mario AR.
Senior Member
Join Date: May 2011
Location: Lima, Perú
Old 02-14-2016 , 23:04   Re: Gravity API v0.3
Reply With Quote #20

Quote:
Originally Posted by Craxor View Post
why you should use set_player_gravity then you would use get_user_gravity in another plugin? You should use Both functions in the same plugin.
Supose this case:
A plugin using your API changes a player gravity, then another plugin changes the same player gravity. This last change is not saved, so, after a map change (or reconnect); the player will get its previous gravity.

Quote:
Originally Posted by Craxor View Post
also is saves the gravity you gave
That functionality is worth for a new plugin, I think.

Since gravity calculations are pretty simple, a plugin developer would do the calculations in the plugin instead of using your API (maybe wouldn't even care if the API exists)!

Off: Hi KliPPy. Hi Hamlet.
I'm glad to be back, and to see that HamletEagle is now an unapprover

Last edited by Mario AR.; 02-14-2016 at 23:15.
Mario AR. is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:53.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode