mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-22 20:31:11 +00:00
Allow func_buttons to be unkickable too (set spawnflags to 8)
This commit is contained in:
parent
4ea01cf8c6
commit
2f6c7477ca
2 changed files with 14 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
//
|
||||
|
@ -1936,7 +1939,13 @@ void SP_func_button(gentity_t * ent)
|
|||
trap_SetBrushModel(ent, ent->model);
|
||||
|
||||
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]);
|
||||
|
|
Loading…
Reference in a new issue