by OneManClan » Mon Feb 11, 2013 3:31 pm
[Hijacking my own thread, but it still comes under the same the same subject so...]
Hey people.
I'm working on a new mod/feature which involves multiple player skins, including (eg) a different skin for each level of blood. It's working well, except for the situation when a player dies. Their corpse (which remains visible on the ground for a while after they have respawned) changes skin, and mimicks the skin of the (now respawned) player. This has always IIUC been a problem with Q1TF and spies, where if a spy respawns and disguises as (eg) 'soldier', his corpse (which stays on the ground for at least 15 (?) seconds), ALSO switches to 'soldier' skin - so the two are connected. What I'd like is to be able to use a new skin, specifically for player corpses, but am having trouble understanding the code.
Can someone explain to me how to change a corpses skin, as distinct from a (respawned) player's skin?
IIUC PutClientInServer() doesnt actually 'spawn' anything, just resets the players 'settings', and PlayerDie() also doesn't spawn anything, so how can there be a player AND his corpse - somewhere a corpse entity was made - which is still responding to skin changes in the living 'version'?
thanks,
OneManClan