mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Added trigger_sideduse from 2.30
This commit is contained in:
parent
eea8c42268
commit
d6870ecbee
2 changed files with 33 additions and 1 deletions
|
@ -457,7 +457,7 @@ void Trigger::TriggerStuff(Event *ev)
|
|||
// if we setup an angle for this trigger, only trigger if other is within ~60 degrees of the triggers origin
|
||||
// only test for this case if we were touched, activating or killed should never go through this code
|
||||
//
|
||||
if (useTriggerDir && (*ev == EV_Touch)) {
|
||||
if (useTriggerDir && (*ev == EV_Touch || (*ev == EV_Use && isSubclassOf(TriggerSidedUse)))) {
|
||||
Vector norm;
|
||||
float dot;
|
||||
|
||||
|
@ -1951,6 +1951,27 @@ CLASS_DECLARATION(Trigger, TriggerUse, "trigger_use") {
|
|||
|
||||
TriggerUse::TriggerUse() {}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*QUAKED trigger_sideduse (1 0 0) ? x x NOT_PLAYERS MONSTERS
|
||||
|
||||
Activates targets when 'used' by an entity. It is usable only within specific degrees.
|
||||
"setthread" name of thread to trigger. This can be in a different script file as well\
|
||||
by using the '::' notation.
|
||||
|
||||
"triggerable" turn trigger on
|
||||
"nottriggerable" turn trigger off
|
||||
|
||||
If NOT_PLAYERS is set, the trigger does not respond to players
|
||||
If MONSTERS is set, the trigger will respond to monsters
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
CLASS_DECLARATION(TriggerUse, TriggerSidedUse, "trigger_sideduse") {
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
TriggerSidedUse::TriggerSidedUse() {}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*QUAKED trigger_useonce (1 0 0) ? x x NOT_PLAYERS MONSTERS
|
||||
|
||||
|
|
|
@ -401,6 +401,17 @@ public:
|
|||
TriggerUse();
|
||||
};
|
||||
|
||||
//
|
||||
// Added in 2.30
|
||||
// Can only be triggered if within specific degrees
|
||||
class TriggerSidedUse : public TriggerUse
|
||||
{
|
||||
public:
|
||||
CLASS_PROTOTYPE(TriggerSidedUse);
|
||||
|
||||
TriggerSidedUse();
|
||||
};
|
||||
|
||||
class TriggerUseOnce : public TriggerUse
|
||||
{
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue