I found something about removing dead corpses, but again the code only
works in the HL project.

Adam "amckern" Mckern wrote:

Search the list - there was an issue with dystopia a
few months ago - i think it was fixed - and posted -
good luck

Adam

--- Kamran <[EMAIL PROTECTED]> wrote:



I have a bit of a problem... from the hl project I
create a new user
message, that works fine. I grab it using my vgui
screen and pass the
data to my function.

I pass the entity index of the sent item. In my
case, it's a healthkit.
Well, what I'd like to do is if my function finishes
successfully, to
remove the item from the map.

If I put this:

pEnt->Remove();

After I send the message in the hl project, it
works. It removes the
entity from the map. However, if I use that same
code in the client project:

C_BaseEntity *pEnt =
C_BaseEntity::Instance(EntityIndex);
   if(pEnt)
   {
       DevMsg("Item removed: Class: %s, index:
%d\n",
pEnt->GetClassname(), pEnt->entindex());
       // pEnt->Remove(); // This line crashes
   }

It will crash; if I break on it, it doesn't give me
any useful
information... it just goes to the RemoveAllPanels
function in
vgui_TeamFortressViewport.cpp file.

Funny thing is... using the same line for pEnt in
the hl project, the
Classname returned is "item_healthkit" however in
the client project,
it's "class CBaseAnimating" but the entindex is fine
and proper.

I'll also mention that this is SP only; no MP.

I've tried:

pEnt->Release();
pEnt->Remove();
pEnt->Clear();
pEnt->Term();

None of them work.
--
Kamran A
Get Firefox! Safer, Faster, Better.



<http://www.spreadfirefox.com/?q=affiliates&id=0&t=85>


Down with Internet Explorer! Say "NO!" to Spyware!
Use Firefox

_______________________________________________
To unsubscribe, edit your list preferences, or view
the list archives, please visit:



http://list.valvesoftware.com/mailman/listinfo/hlcoders






My Website http://ammahls.com
Lead Programer NightFall

This email has been sent from Adam McKern, and is not one of the many spam bots 
that use my email address.
If you receive an email that has not got this signature line, please delate the 
email, and not respond in any way to it.



____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders






--
Kamran A
Get Firefox! Safer, Faster, Better.
<http://www.spreadfirefox.com/?q=affiliates&id=0&t=85>
Down with Internet Explorer! Say "NO!" to Spyware! Use Firefox

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to