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

Need help with angles)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 11-22-2017 , 08:10   Need help with angles)
Reply With Quote #1

Code:
new Float:angles[3]; pev(id, pev_angles, angles);

Can't understand with points for angles used in HLDSK

Is
Code:
0.0 <= angles[0] <= 360.0
Is it true?

Last edited by ZASTRELIS; 11-22-2017 at 08:10.
ZASTRELIS is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 11-22-2017 , 08:49   Re: Need help with angles)
Reply With Quote #2

What are you trying to achieve?
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 11-22-2017 , 08:53   Re: Need help with angles)
Reply With Quote #3

I've a second problem with grenades in FL_ONGROUND state or when registered touch worldspawn.

Code:
(pev(grenade, pev_flags) & FL_ONGROUND)
false when: periodical grenade collision with straight, flat ground

if we have ground under some angle, (pev(grenade, pev_flags) & FL_ONGROUND) returns true.. wtf/
ZASTRELIS is offline
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 11-22-2017 , 09:00   Re: Need help with angles)
Reply With Quote #4

Quote:
Originally Posted by Natsheh View Post
What are you trying to achieve?
Spoiler


If you can see block
Code:
if(!(pev(id, pev_flags) & FL_ONGROUND))     angles[2] += 5.0;     else {     set_task(0.5, "GrenTaskRotate", GREN_TASK+id);     return; }
You can understand that I want to make some pause for ent wich touched ground. But fkng FL_ONGROUND not works correctly :'|

IMHO amx mod x not supported boolean forward wich can tell that grenade INtouche. I was able to find register_touch method only, but its not fits to me because I want to get touch a result in real time.
Such as (pev(id, pev_flags) & FL_INTOUCH)

Last edited by ZASTRELIS; 11-22-2017 at 09:17.
ZASTRELIS is offline
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 11-22-2017 , 10:20   Re: Need help with angles)
Reply With Quote #5

hmmm, I can use register_touch on my ent and check to the task in.. theme temp in solve.

Last edited by ZASTRELIS; 11-22-2017 at 10:27.
ZASTRELIS is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 11-22-2017 , 11:48   Re: Need help with angles)
Reply With Quote #6

You didnt explain properly, dont post a code samples, try explaining more of what you are trying to achieve.

And stick to the 1st problem, new problem new thread.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 11-22-2017 at 12:49.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
TheWhitesmith
Senior Member
Join Date: Oct 2017
Location: Morocco :c
Old 11-22-2017 , 13:48   Re: Need help with angles)
Reply With Quote #7

I believe he wants to make the grenade more realistic, like when it hits a wall or the floor, it starts spinning. (that's what I understood)
TheWhitesmith is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 11-22-2017 , 15:42   Re: Need help with angles)
Reply With Quote #8

He said that grenade doesn't properly set FL_ONGROUND flag. Sometimes it touches the ground, but (pev(ent, pev_flags & FL_ONGROUND) still returns false.
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 11-23-2017 , 08:12   Re: Need help with angles)
Reply With Quote #9

Quote:
Originally Posted by Natsheh View Post
You didnt explain properly, dont post a code samples, try explaining more of what you are trying to achieve.

And stick to the 1st problem, new problem new thread.
sorry my english skill's very bad
ZASTRELIS is offline
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 11-23-2017 , 08:15   Re: Need help with angles)
Reply With Quote #10

Quote:
Originally Posted by TheWhitesmith View Post
I believe he wants to make the grenade more realistic, like when it hits a wall or the floor, it starts spinning. (that's what I understood)
Yes, I thought about it. But I encounter with a problem when started.. NiHiLaNTh understood my problem.

Quote:
Originally Posted by NiHiLaNTh View Post
He said that grenade doesn't properly set FL_ONGROUND flag. Sometimes it touches the ground, but (pev(ent, pev_flags & FL_ONGROUND) still returns false.
(pev(ent, pev_flags & FL_ONGROUND), when ground located straight

and

!(pev(ent, pev_flags & FL_ONGROUND), when ground located in some angle


I didn't tried to make through register_touch yesterday, but now I can do it.

And... TheWhitesmith, what advice you can give to me in this situdation, in my problem with more realistic spinning?

Because I've some lagged version of spinning now. Thx.

Last edited by ZASTRELIS; 11-23-2017 at 09:49.
ZASTRELIS 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 11:54.


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