summaryrefslogtreecommitdiff
path: root/src/game/g_client.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2003-02-11 01:39:31 +0000
committerTim Angus <tim@ngus.net>2003-02-11 01:39:31 +0000
commit64d793805923e8a1a20b6d7a305ace38e5719c86 (patch)
treef83e2a82d956f710a9c860c4603f3719e758326d /src/game/g_client.c
parent7fb2163f6ae14777a69de60ce8eb89e6a8dbbdc2 (diff)
* Death animations now play correctly for nonsegmented models
* Nonesgmented corpses now render properly
Diffstat (limited to 'src/game/g_client.c')
-rw-r--r--src/game/g_client.c53
1 files changed, 39 insertions, 14 deletions
diff --git a/src/game/g_client.c b/src/game/g_client.c
index 224c4bca..edd2ebed 100644
--- a/src/game/g_client.c
+++ b/src/game/g_client.c
@@ -709,6 +709,7 @@ void SpawnCorpse( gentity_t *ent )
body->r.contents = CONTENTS_CORPSE;
body->clipmask = CONTENTS_SOLID | CONTENTS_PLAYERCLIP;
body->s.clientNum = ent->client->ps.stats[ STAT_PCLASS ];
+ body->nonSegModel = ent->client->ps.persistant[ PERS_STATE ] & PS_NONSEGMODEL;
if( ent->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS )
{
@@ -746,21 +747,45 @@ void SpawnCorpse( gentity_t *ent )
}
body->s.legsAnim = ent->s.legsAnim;
- switch( body->s.legsAnim & ~ANIM_TOGGLEBIT )
+
+ if( !body->nonSegModel )
{
- case BOTH_DEATH1:
- case BOTH_DEAD1:
- body->s.torsoAnim = body->s.legsAnim = BOTH_DEAD1;
- break;
- case BOTH_DEATH2:
- case BOTH_DEAD2:
- body->s.torsoAnim = body->s.legsAnim = BOTH_DEAD2;
- break;
- case BOTH_DEATH3:
- case BOTH_DEAD3:
- default:
- body->s.torsoAnim = body->s.legsAnim = BOTH_DEAD3;
- break;
+ switch( body->s.legsAnim & ~ANIM_TOGGLEBIT )
+ {
+ case BOTH_DEATH1:
+ case BOTH_DEAD1:
+ body->s.torsoAnim = body->s.legsAnim = BOTH_DEAD1;
+ break;
+ case BOTH_DEATH2:
+ case BOTH_DEAD2:
+ body->s.torsoAnim = body->s.legsAnim = BOTH_DEAD2;
+ break;
+ case BOTH_DEATH3:
+ case BOTH_DEAD3:
+ default:
+ body->s.torsoAnim = body->s.legsAnim = BOTH_DEAD3;
+ break;
+ }
+ }
+ else
+ {
+ G_Printf( "nonsegmented death\n" );
+ switch( body->s.legsAnim & ~ANIM_TOGGLEBIT )
+ {
+ case NSPA_DEATH1:
+ case NSPA_DEAD1:
+ body->s.legsAnim = NSPA_DEAD1;
+ break;
+ case NSPA_DEATH2:
+ case NSPA_DEAD2:
+ body->s.legsAnim = NSPA_DEAD2;
+ break;
+ case NSPA_DEATH3:
+ case NSPA_DEAD3:
+ default:
+ body->s.legsAnim = NSPA_DEAD3;
+ break;
+ }
}
body->takedamage = qfalse;