mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Trigger must not be effective when being damaged if it does not take damage
This fixes issue with vehicles damaging triggers by touching them (like the ClickItemTrigger on m5l3 with tanks)
This commit is contained in:
parent
05a6b43e08
commit
d4dfde3340
1 changed files with 4 additions and 0 deletions
|
@ -766,6 +766,10 @@ void Trigger::DamageEvent(Event *ev)
|
|||
Vector dir;
|
||||
Vector momentum;
|
||||
|
||||
if (!takedamage) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Immune(ev->GetInteger(9))) {
|
||||
// trigger is immune
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue