Allow func_buttons to be unkickable too (set spawnflags to 8)

This commit is contained in:
Scott Brooks 2002-08-22 05:00:01 +00:00
parent 4ea01cf8c6
commit 2f6c7477ca
2 changed files with 14 additions and 2 deletions

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.119 2002/08/22 05:00:01 blaze
// Allow func_buttons to be unkickable too (set spawnflags to 8)
//
// Revision 1.118 2002/08/21 03:35:16 niceass
// only get damage points if attacking a client
//
@ -1813,7 +1816,7 @@ void G_Damage(gentity_t * targ, gentity_t * inflictor, gentity_t * attacker,
return;
}
if (targ->s.eType == ET_BREAKABLE && targ->unkickable == qtrue){
if ( (targ->s.eType == ET_BREAKABLE || targ->s.eType == ET_MOVER) && targ->unkickable == qtrue){
return;
}

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.50 2002/08/22 05:00:01 blaze
// Allow func_buttons to be unkickable too (set spawnflags to 8)
//
// Revision 1.49 2002/07/31 19:56:32 makro
// Fixed the code for doors with health and the wait key set to a negative value
//
@ -1937,6 +1940,12 @@ void SP_func_button(gentity_t * ent)
G_SpawnFloat("lip", "4", &lip);
if (ent->spawnflags & 8) {
ent->unkickable = qtrue;
} else {
ent->unkickable = qfalse;
}
G_SetMovedir(ent->s.angles, ent->movedir);
abs_movedir[0] = fabs(ent->movedir[0]);
abs_movedir[1] = fabs(ent->movedir[1]);