The first message won't print because it only updates the screen ever
VGui frame. Try a dedicated server... or even better just debug with
Visual Studio.

On Saturday, May 15, 2010, Klaus Müller <tloeffl...@googlemail.com> wrote:
> Thanks for the tip, Tony. Unfortunately though, I don't really know how to
> get it working. The game crashes immediately when I respawn :/ I moved the
> hl2mp cleanmap code to FrameUpdatePostEntityThink() in entitylist.cpp and
> did a similar call to it as with respawn_entities. I added a concommand that
> will set the cleanmap boolean to true. Then, in FrameUpdatePostEntityThink()
> I check if the var is true, set it to false and execute the cleanmap code
> from hl2mp with the proper changes that were necessary to make it compile.
> Due to it crashing immediately, I decided to add DevMsg()'s to find out the
> exact line it crashes on. For some reason, not even the first message is
> printed:
>
>     void FrameUpdatePostEntityThink()
>     {
>         g_TouchManager.FrameUpdatePostEntityThink();
>
>         if( m_bCleanMap )
>         {
>             m_bCleanMap = false;
>             DevMsg( 1, "bla1\n" );
>
>         // Get rid of all entities except players.
>         CBaseEntity *pCur = gEntList.FirstEnt();
>        // ...
>
>
> 2010/5/15 Tony "omega" Sergi <omegal...@gmail.com>
>
>> I wouldn't use the respawn_entities command itself to do it, but rather
>> take
>> the HL2MP map cleanup code and use that.
>> do the clean up, then respawn the player.
>> That way it doesn't just explicitly respawn stuff that should only be
>> spawned once.
>>
>>
>> On Sun, May 16, 2010 at 5:40 AM, Klaus Müller <tloeffl...@googlemail.com
>> >wrote:
>>
>> > Okay, I played around a bit and it seems like calling an
>> > engine->ServerCommand("respawn_entities\n") from respawn() in
>> > hl2_client.cpp
>> > and moving the pPlayer->RemoveSolidFlags( FSOLID_NOT_SOLID ) to the
>> > function
>> > that actually respawns the entities (which is void
>> > FrameUpdatePostEntityThink() in entitylist.cpp) works fine. No more
>> getting
>> > stuck in my HEV suit now ;> There's two little issues though, well, let's
>> > say three:
>> >
>> > 1. For some reason the FrameUpdatePostEntityThink() gets called twice
>> with
>> > the parameter m_bRespawnAllEntities set to true. This is weird because
>> the
>> > first thing that's done in the if-statement is setting the variable to
>> > false
>> > so the if-statement is ignored on the next think. When you execute the
>> > respawn_entities command, the function void RespawnEntities() gets called
>> > which sets the m_bRespawnAllEntities variable to true.
>> >
>> >    void FrameUpdatePostEntityThink()
>> >    {
>> >        g_TouchManager.FrameUpdatePostEntityThink();
>> >
>> >        if ( m_bRespawnAllEntities )
>> >        {
>> >            m_bRespawnAllEntities = false;
>> >            // ...
>> >
>> > This is annoying because I'm starting demo recording right after
>> respawning
>> > as well. If the function gets called twice, there'll always be the
>> console
>> > output "Already recording." which looks kind of sloppy.
>> >
>> > 2. This only happens on a test map I made myself. When I respawn, the HEV
>> > suit spawns as well, obviously, but apparently the player already spawns
>> > with one causing there to be another suit in the map which you can't pick
>> > up. If I respawn on any map from HL2, all items spawn properly, you have
>> > your suit but there's not a second one standing around in the map.
>> >
>> > 3. This happened a couple of times on certain HL2 maps. After respawning,
>> > textures started to look light blue, sometimes the distance fog wouldn't
>> be
>> > rendered. This occured on d2_coast_07 as well as on others. Also,
>> sometimes
>> > items won't spawn at all, just the player and certain key input seems to
>> be
>> > ignored (e.g. F1 which I use to open the console). I cannot tell how to
>> > reproduce this unfortunately. It seems as if this only happens with HL2
>> > maps, Ep2 maps don't seem to have the graphics issues, but the item issue
>> > happens there, too occasionally. For example, ep2_outland_08. If I make
>> it
>> > to the chopper fight, then die and respawn, I start in the tunnel at the
>> > very beginning and don't get any items at all. The mod is based on Ep2
>> > which
>> > is why I have AppID 420 in my gameinfo.txt. Beside that, I parse the HL2
>> > content via AdditionalContentId 220.
>> >
>> >
>> >
>> > 2010/5/14 Klaus Müller <tloeffl...@googlemail.com>
>> >
>> > > The first part worked great, the second not so much :/
>> > > I added this to respawn():
>> > >
>> > > if( pEdict->IsPlayer() )
>> > > {
>> > >     CBasePlayer *pPlayer = (CBasePlayer*) pEdict;
>> > >     pPlayer->Spawn();
>> > >     pPlayer->RemoveSolidFlags( FSOLID_NOT_SOLID );
>> > > }
>> > >
>> > > If I do an additional call to
>> > engine->ServerCommand("respawn_entities\n"),
>> > > I get stuck in my suit :> What's even worse though is that there are no
>> > > decals anymore after the ServerCmd call. Also, the console command
>

-- 

Thanks,
 - Saul.

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

Reply via email to