+#include "../_all.qh"
+
+#include "mutator.qh"
+
.entity msnt_lookat;
.float msnt_timer;
.vector msnt_deathloc;
MUTATOR_HOOKFUNCTION(msnt_Spawn_Score)
-{
+{SELFPARAM();
if(autocvar_g_spawn_near_teammate_ignore_spawnpoint)
return 0;
if(RandomSelection_chosen_ent)
{
spawn_spot.msnt_lookat = RandomSelection_chosen_ent;
- spawn_score_x += SPAWN_PRIO_NEAR_TEAMMATE_FOUND;
+ spawn_score.x += SPAWN_PRIO_NEAR_TEAMMATE_FOUND;
}
else if(self.team == spawn_spot.team)
- spawn_score_x += SPAWN_PRIO_NEAR_TEAMMATE_SAMETEAM; // prefer same team, if we can't find a spawn near teammate
+ spawn_score.x += SPAWN_PRIO_NEAR_TEAMMATE_SAMETEAM; // prefer same team, if we can't find a spawn near teammate
return 0;
}
MUTATOR_HOOKFUNCTION(msnt_PlayerSpawn)
-{
+{SELFPARAM();
// Note: when entering this, fixangle is already set.
if(autocvar_g_spawn_near_teammate_ignore_spawnpoint)
{
else if(spawn_spot.msnt_lookat)
{
self.angles = vectoangles(spawn_spot.msnt_lookat.origin - self.origin);
- self.angles_x = -self.angles_x;
+ self.angles_x = -self.angles.x;
self.angles_z = 0; // never spawn tilted even if the spot says to
/*
sprint(self, "You should be looking at ", spawn_spot.msnt_lookat.netname, "^7.\n");
}
MUTATOR_HOOKFUNCTION(msnt_PlayerDies)
-{
+{SELFPARAM();
self.msnt_deathloc = self.origin;
return 0;
}