![]() |
entity origin?
Okay, I have an edict_t pointer.
edict_t *pEdict; It can be anything, a player OR not. How can I determine the entity's origin ? I tried pEdict->GetCollideable()->GetCollisionOrigin() but that doesn't seem to be it. I know how to do it for players (although it seems to be the feet origin, watch the bbmin and bbmax), but does that mean that the new entities have no "origin" anymore ? Accessorily, one second question: with this new engine, is the edict_t pointer still the best way to keep track of an entity ? |
Re: entity origin?
I used this
PHP Code:
|
Re: entity origin?
I have found that not all entities work in the same way, much like you say the entity collision origin doesn't quite seem right all the time. But for 'box' like entities e.g. the bomb_zone entity, the line
Quote:
If it returns vMins==vMaxs then the ->GetCollisionOrigin() is normally correct. As to traking an entity, I don't know, especailly for 'created' entities. For map entities I just keep track of them in the list passed here, which seems to work so far; Quote:
|
Re: entity origin?
thanks a lot both of you, that seems to work indeed. I find it weird to need to navigate through completely different classes to get the info I want, especially Cheeseh's PVS kludge... wow. Scary. Now on for the cleanest way to draw beams...
|
Re: entity origin?
ok, great.
Now does any of you know how to SET an entity's origin ? (teleporting a player). There's something related to props, but it looks scary and I don't want to include 50 header files again :( Am I missing a simple way ? |
Re: entity origin?
Did you try looking at the teleporter code? trigger_teleport
|
Re: entity origin?
They use SetAbsoluteOrigin on a CBaseEntity. The thing is, I don't WANT to access CBaseEntity, because it's mod specific.
|
Re: entity origin?
Keep looking, but don't rule out CBaseEntity. If a mod were to change this then a lot of other things would need to change. CBasePlayer on the other hand... well even I'm avoiding it at all costs. :D
|
Re: entity origin?
you might be able to do it through the new infoplayermanager interface (it has since been updated too along with the new bot stuff)
edit: -- ok no! You can teleport a bot using it's "bot controller" object though |
Re: entity origin?
has anyone found a solution to this problem, it doesnt seem like u can change players location thru a plugin?
|
All times are GMT +2. The time now is 01:09. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.