spn_origin.y = ReadShort();
spn_origin.z = ReadShort();
- if(is_new)
- {
+ //if(is_new)
+ //{
self.origin = spn_origin;
setsize(self, PL_MIN_CONST, PL_MAX_CONST);
- droptofloor();
+ //droptofloor();
/*if(autocvar_cl_spawn_point_model) // needs a model first
{
self.draw = Spawn_Draw;
}
- }
+ //}
//printf("Ent_ReadSpawnPoint(is_new = %d); origin = %s, team = %d, effect = %d\n", is_new, vtos(self.origin), teamnum, self.cnt);
}
{
WriteByte(MSG_ENTITY, ENT_CLIENT_SPAWNPOINT);
+ print("Sending spawnpoint\n");
+
WriteByte(MSG_ENTITY, self.team);
WriteShort(MSG_ENTITY, self.origin.x);
WriteShort(MSG_ENTITY, self.origin.y);
return send;
}
+.vector spawnpoint_prevorigin;
+void spawnpoint_think()
+{
+ self.nextthink = time + 0.1;
+ if(self.origin != self.spawnpoint_prevorigin)
+ {
+ self.spawnpoint_prevorigin = self.origin;
+ self.SendFlags |= 1;
+ }
+}
+
void spawnpoint_use()
{SELFPARAM();
if(teamplay)
}
self.use = spawnpoint_use;
+ self.think = spawnpoint_think;
+ self.nextthink = time + 0.5 + random() * 2; // shouldn't need it for a little second
self.team_saved = self.team;
if (!self.cnt)
self.cnt = 1;