// return error to request removal
// INPUT: self - turret
-MUTATOR_HOOKABLE(TurretDies);
- // called when a turret dies
-
-MUTATOR_HOOKABLE(TurretValidateTarget);
- // return target score
- // INPUT:
- entity turret_target;
- entity turret;
- float turret_flags;
-
MUTATOR_HOOKABLE(OnEntityPreSpawn);
// return error to prevent entity spawn, or modify the entity
self.takedamage = DAMAGE_NO;
self.health = 0;
-
- MUTATOR_CALLHOOK(TurretDies);
// Go boom
//RadiusDamage (self,self, min(self.ammo,50),min(self.ammo,50) * 0.25,250,world,min(self.ammo,50)*5,DEATH_TURRET,world);
float turret_validate_target(entity e_turret, entity e_target, float validate_flags)
{
vector v_tmp;
-
- turret_target = e_target;
- turret_flags = validate_flags;
- turret = e_turret;
- if(MUTATOR_CALLHOOK(TurretValidateTarget))
- return 1;
- e_target = turret_target;
- e_turret = turret;
//if(!validate_flags & TFL_TARGETSELECT_NOBUILTIN)
// return -0.5;