Posted by: omega
Date posted: Dec 23 2003 User Rating: 4.4 out of 5.0 | Number of views: 6144 Number of comments: 6 | Description: A Simple 4-line fix for spinning corpses. |
You know how when you die; and your corpse spins around on the ground when you look around? Well, this whopping 4-line tutorial will give you those 4-lines to stop the spinning corpses!
I don't really need to say anything else, so here you go: player.h: (anywhere inside CBasePlayer class definition)
player.cpp Inside PlayerPostThink
| | pt_end: if (pev->deadflag == DEAD_NO) v_LastAngles = pev->angles; else pev->angles = v_LastAngles;
|
This will still allow the player to look around, but the model won't spin with them.
Enjoy. |
|
User Comments
Showing comments 1-6
There's no such thing as PlayerPostThink in Player.cpp therefore I give it a 4 :)
There's only a PostThink on player.cpp |
|
thats the function he is referring to, the player => CBasePlayer its the class. you cant expect him to copy all of it letter for letter, its already easy enough. |
|
It would be much better if the CLIENT.DLL would not send dead player's angles down to server. |
|
yeah but it does because the dead player is still an entity on the server. the other solution is to make client side corpses (which i did for flf 2.0, and cs 1.5+ has) |
|
I know I'm a little late coming to this particular party ... but I've just recently started tinkering with the HL SDK. All I'm doing so far is fiddling with the HLDM minimod (an unmodified mod until now) that I've been using for a while now to host my own maps.
This snippet of code was the first that I applied once I started poking around the SDK, so thanks for getting me started! It worked just fine. Of course, it also led to a discussion between myself and a mate as to whether we wanted corpses to be able to look around at all, which ultimately led to adding some fade-to-red code upon death -- but it was this that got me started! :-)Edited by darkPhoenix on Sep 06 2008, 00:13:28
|
|
You must register to post a comment. If you have already registered, you must login.
|