- if (!IS_PLAYER(self) || weapon_prepareattack(false, 0.2)) {
- if (!self.target_range) self.target_range = autocvar_g_monsters_target_range;
- self.enemy = Monster_FindTarget(self);
- W_SetupShot_Dir(self, v_forward, false, 0, W_Sound("electro_fire"), CH_WEAPON_B, 0);
- if (!IS_PLAYER(self)) w_shotdir = normalize((self.enemy.origin + '0 0 10') - self.origin);
+ if (!IS_PLAYER(actor) || weapon_prepareattack(thiswep, actor, false, 0.2)) {
+ if (!actor.target_range) actor.target_range = autocvar_g_monsters_target_range;
+ actor.enemy = Monster_FindTarget(actor);
+ W_SetupShot_Dir(actor, v_forward, false, 0, W_Sound("electro_fire"), CH_WEAPON_B, 0);
+ if (!IS_PLAYER(actor)) w_shotdir = normalize((actor.enemy.origin + '0 0 10') - actor.origin);