3 .entity trigger_gravity_check;
4 void trigger_gravity_remove(
entity own)
6 if(own.trigger_gravity_check.owner == own)
9 own.gravity = own.trigger_gravity_check.gravity;
10 delete(own.trigger_gravity_check);
13 backtrace(
"Removing a trigger_gravity_check with no valid owner");
14 own.trigger_gravity_check =
NULL;
16 void trigger_gravity_check_think(
entity this)
23 if(this.
owner.trigger_gravity_check ==
this)
24 trigger_gravity_remove(this.
owner);
55 if(toucher.trigger_gravity_check)
57 if(
this == toucher.trigger_gravity_check.enemy)
61 toucher.trigger_gravity_check.count = 2;
66 if(this.
cnt > toucher.trigger_gravity_check.enemy.cnt)
67 trigger_gravity_remove(toucher);
71 toucher.trigger_gravity_check =
new_pure(trigger_gravity_checker);
72 toucher.trigger_gravity_check.enemy =
this;
73 toucher.trigger_gravity_check.owner = toucher;
74 toucher.trigger_gravity_check.gravity = toucher.gravity;
75 setthink(toucher.trigger_gravity_check, trigger_gravity_check_think);
76 toucher.trigger_gravity_check.nextthink =
time;
77 toucher.trigger_gravity_check.count = 2;
82 if (toucher.gravity != g)
97 settouch(
this, trigger_gravity_touch);
102 this.setactive = generic_setactive;
106 this.
use = trigger_gravity_use;
#define EXACTTRIGGER_INIT
const int GRAVITY_START_DISABLED
#define EXACTTRIGGER_TOUCH(e, t)
spawnfunc(info_player_attacker)
void UpdateCSQCProjectile(entity e)
#define _sound(e, c, s, v, a)
#define new_pure(class)
purely logical entities (.origin doesn't work)