I put it in a new file I created called g_bacon.c
You could try making a new file called g_raffles.c or something and add this to it:
#include "g_local.h"
void B_PlayDead( gentity_t *ent ) {
if ( ent->client && ent->flags & B_PLAYINGDEAD ) {
BG_AnimScriptEvent( &ent->client->ps, ent->client->pers.character->animModelInfo, ANIM_ET_REVIVE, qfalse, qtrue );
ent->client->ps.pm_flags |= PMF_TIME_LOCKPLAYER;
ent->client->ps.pm_time = 2100;
return;
} else {
if ( ent->client->ps.pm_flags & PMF_FLAILING ) {
BG_AnimScriptAnimation( &ent->client->ps, ent->client->pers.character->animModelInfo, ANIM_MT_FLAILING, qtrue );
if( !ent->client->ps.pm_time )
ent->client->ps.pm_flags &= ~PMF_FLAILING; // the eagle has landed
} else {
if ( ent->client->ps.groundEntityNum == ENTITYNUM_NONE ) {
// takeoff!
ent->client->ps.pm_flags |= PMF_FLAILING;
BG_AnimScriptAnimation( &ent->client->ps, ent->client->pers.character->animModelInfo, ANIM_MT_FLAILING, qtrue );
} else {
BG_AnimScriptAnimation( &ent->client->ps, ent->client->pers.character->animModelInfo, ANIM_MT_FALLEN, qtrue );
}
}
return;
}
}
In g_cmds.c I have:
/*
=================
PlayDead
=================
*/
// put this anywhere as long as it's not in any other functions and is before clientcommand
void Cmd_Playdead_f( gentity_t *ent ) {
if ( ent->flags & B_PLAYINGDEAD )
ent->flags &= ~B_PLAYINGDEAD;
else
ent->flags |= B_PLAYINGDEAD;
B_PlayDead( ent );
}
// place this after the "imready command"
} else if (Q_stricmp( cmd, "playdead") == 0) {
Cmd_Playdead_f( ent );
return;
And at the end of clientthink_real (g_active.c) I have this:
if ( ent->flags & B_PLAYINGDEAD )
B_PlayDead( ent ); // play a "revive me" animation when we're playing dead
In g_local I’ve defined B_PLAYINGDEAD but I don’t know how many flags you have so I won’t give you that (easy) code.