dead body owner and position
Is is possible to find out what players dead body is on the floor?
|
Re: dead body owner and position
check m_hOwner / m_hOwnerEntity offsets
|
Re: dead body owner and position
m_hOwnerEntity returned -1 for me. This works as long as the players dont respawn (even then you could save the results on player death):
Code:
EDIT: IGNOREME, see 3 posts below :) |
Re: dead body owner and position
Wouldn't you want to find the offset of the owner on the prop_ragdoll or whatever entity class that is the corpse actually is.
|
Re: dead body owner and position
Quote:
I didnt even look at the other ragdoll props, and now that I did, I saw m_hPlayer which does exactly what you want. Code:
|
Re: dead body owner and position
fyi ragdolls aren't networked past their creation to my knowledge. (i.e., no position updates, etc)
|
Re: dead body owner and position
So if they are not networked; you can not walk up to and look at a dead player and have info about who it was, printed to chat or console...correct?
|
Re: dead body owner and position
No you can, the owner of the ragdoll is stored in it's entity info. Kigen is saying that information isn't updated after it's been created.
|
Re: dead body owner and position
Thanks for the responses:)
How about if I wanted to find the entities position to do a distance calculation; how do I get the ragdolls entity index? |
Re: dead body owner and position
find the classname of the entity that is spawned as a ragdoll. phys_ragdoll or something.. then scroll though them with FindEntityByClassName(eTarget, "prop_ragdoll"), when you find one whose owner is your target then you can get the m_vecOrigin(?) properties.
but depending on the mod, usually any updates to the corpse are handled client side... which is why screenshots of a given scene are sometimes different. my view of the corpse is over here. yours will be over there. somie mods (like hidden-source) maintain position data for them since they contribute to game-play. so your data will report the position the entity was spawned at. for that matter what would GetClientAimTarget() reply with for non-updated entities? |
| All times are GMT -4. The time now is 21:48. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.