mirror of
https://github.com/dhewm/dhewm3-sdk.git
synced 2025-04-10 19:31:37 +00:00
Update AFEntity.cpp
This commit is contained in:
parent
e228fea6f0
commit
dab88884ef
1 changed files with 8 additions and 2 deletions
|
@ -1191,14 +1191,20 @@ void idAFEntity_Gibbable::Gib( const idVec3 &dir, const char *damageDefName ) {
|
|||
UnlinkCombat();
|
||||
|
||||
if ( g_bloodEffects.GetBool() ) {
|
||||
if ( gameLocal.time > gameLocal.GetGibTime() ) {
|
||||
// Real Gibs - Taken from the repository (https://github.com/RobertBeckebans/Sikkpin-Feedback)
|
||||
// sikk - Since "nextGibTime" is a member of idGameLocal and not idAFEntity||idAFEntity_Gibbable
|
||||
// the folloing if statement is only true once per damage event instead of per entity being damaged.
|
||||
// This is why only one entity will get gibbed while the rest just disappear after a few seconds.
|
||||
// I commented this out instead of moving the variable to the proper class because it's easier and
|
||||
// the delay is only 200ms so the difference should be unnoticable
|
||||
//if ( gameLocal.time > gameLocal.GetGibTime() ) {
|
||||
gameLocal.SetGibTime( gameLocal.time + GIB_DELAY );
|
||||
SpawnGibs( dir, damageDefName );
|
||||
renderEntity.noShadow = true;
|
||||
renderEntity.shaderParms[ SHADERPARM_TIME_OF_DEATH ] = gameLocal.time * 0.001f;
|
||||
StartSound( "snd_gibbed", SND_CHANNEL_ANY, 0, false, NULL );
|
||||
gibbed = true;
|
||||
}
|
||||
//}
|
||||
} else {
|
||||
gibbed = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue