The first issue is a deficiency of CBasePlayer, I believe. You'll need to call RemoveSolidFlags( FSOLID_NOT_SOLID ) in your player's spawn() func.
The second issue can be resolved with respawn_entities console command, which may well work around your first issue too. On 14/05/2010 3:09, Klaus Müller wrote: > Hey, > > I've got a problem again with a different project though. It's a single > player mod based on Ep2 (Source engine 2k7). I want my player to respawn > after he dies, and not reload the entire map. Therefore, I simply did a > pEdict->Spawn() call in void respawn( CBaseEntity *pEdict, bool fCopyCorpse > ) in hl2_client.cpp by default. That's also what happens in MP mode. > However, once respawned (without suit, obviously), the collision types seem > to be wrong. For instance, if I jump onto an object, say a wooden pallet or > a wooden box, I slowly get pushed away from it which doesn't happen on > initial spawn. Also, if I grab an object and jump a couple times while > looking to the ground, I get stuck in the object (message: server got stuck > in object bla.mdl). The weirdest thing, however, is that eventuall I'll > "fall" through the object and completely out of the level. I tried calling > an additional Activate() in respawn() but that didn't do anything. > > That's one question. The second one deals with items. Since I already picked > up the items when I first spawned the map, they are gone once I respawn. I > thought about making a copy of the item list when the player dies and just > pass them to the respawn func and give them to the player after respawning. > However, any other objects on the map will still be the same (e.g. boxes > might be broken), and I need them to be where they were when the map spawned > the first time (due to gameplay reasons). The reason I don't want to reload > the map is that it takes too long and thus will ruin the playflow of the > mod. Does anyone know how I could reset the map and its entities without > using a engine->ServerCommand("reload\n") call? > > Kind regards, > Klaus > _______________________________________________ > 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