Ok, I got this sorted (pretty much) recently - it may not be the tidiest way
of doing it, but it works!

What I did was create a filter class (I found it while looking through the
verc forums -
http://www.chatbear.com/board.plm?a=viewthread&t=549,1104207081,14733&b=4991
&id=767996&v=flatold&s=20) which lets me track the entities that I want to
*keep* through a restart. Once I had that, I needed access to the list of
entities that the current map contains, which is as far as I can tell, only
available when the map loads, so I put in a couple of extra procedures in
the IGameSystem class (a global singleton interface to the game rules).
These let me cache a copy of the entity list from
CServerGameDLL::LevelInit_ParseAllEntities() (found in
sdk_gameinterface.cpp).

With that information, I was able to loop through all the entities, check if
I they needed deleting - use UTIL_Remove on them to do so. Once the entity
list was clear, I call MapEntity_ParseAllEntities with the map entity list
and the filter. Then it's just a case of calling the spawn function on the
players.

A full list of the changes - new procedures etc can be found here :
http://www.hidden-source.com/round-restart.php

One thing to note, it doesn't remove decals or debris, I assume they're
temporary effects on the client side - not that big a deal.

Ging

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ben Davison
Sent: 24 February 2005 23:35
To: [email protected]
Subject: Re: [hlcoders] Resetting entites on round restart.

I belive mapenties.h is a start, but I would like to hear frm people who
have already done it or done work on it.

I'm having a hard time getting my head around it.


On Thu, 24 Feb 2005 15:19:04 -0800, Stephen Micheals
<[EMAIL PROTECTED]> wrote:
> Im also interested on how to do this.
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>


--
- Ben Davison
- http://www.shadow-phoenix.com

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



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

Reply via email to