}
void trigger_gravity_check_think(entity this)
{
- // This spawns when a player enters the gravity zone and checks if he left.
+ // This spawns when a player enters the gravity zone and checks if they left.
// Each frame, this.count is set to 2 by trigger_gravity_touch() and decreased by 1 here.
// It the player has left the gravity trigger, this will be allowed to reach 0 and indicate that.
if(this.count <= 0)
else
return;
}
- toucher.trigger_gravity_check = spawn();
+ toucher.trigger_gravity_check = new_pure(trigger_gravity_checker);
toucher.trigger_gravity_check.enemy = this;
toucher.trigger_gravity_check.owner = toucher;
toucher.trigger_gravity_check.gravity = toucher.gravity;
this.active = ACTIVE_ACTIVE;
this.setactive = generic_setactive;
- IFTARGETED
+ if(this.targetname && this.targetname != "")
{
// legacy use
this.use = trigger_gravity_use;