Raised This Month: $32 Target: $400
 8% 

Solved Familiarity with GetEntityFlag()


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 02-15-2018 , 04:26   Familiarity with GetEntityFlag()
Reply With Quote #1

Hey, I was just wondering... Since GetEntityFlag work with alive players, does it work for dead objects like ragdolls, death models, and other stuff related to corpses?

For example, if a corpse is in the water, does the statement below return true?
PHP Code:
if (GetEntityFlag(corpse) & FL_INWATER
Edit: Solved!

Last edited by cravenge; 02-16-2018 at 20:55. Reason: Got my answer... :)
cravenge is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 02-15-2018 , 07:54   Re: Familiarity with GetEntityFlag()
Reply With Quote #2

For most entities that would probably work.

However player ragdolls are not done on the server side in most games. The server creates the ragdoll, dispatches it to the client, and the client handles any animations/placement for it. I believe that the server deletes the ragdoll immediately afterwards, but I can't say that for certain and the Valve Developer wiki is currently down.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 02-16-2018 , 20:54   Re: Familiarity with GetEntityFlag()
Reply With Quote #3

Oh, that explains why there's a sudden large amount of network traffic when they are spawned. I hope I can find the cvars that handles them.

Btw, just quick tested this, the statement returns true which means GetEntityFlag gets the current state of an entity, no matter what kind it is as long as it is valid and whether said entity is falling from a high place or submerged deep into the water.

Last edited by cravenge; 02-16-2018 at 20:56.
cravenge 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 21:15.


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