by ensureing if the players is a camrea, then %conection.camera knows it's the same thing
This commit is contained in:
AzaezelX 2026-01-21 12:16:12 -06:00
parent 475142b847
commit aacb41ce0b

View file

@ -199,8 +199,13 @@ function GameConnectionListener::onSetSpawnPointComplete( %this, %client )
%client.player = spawnObject(%client.spawnClass, %client.spawnDataBlock, "", %client.spawnProperties, %client.spawnScript);
if(!isObject(%client.player))
{
error("Failed to spawn player object!");
}
else if (%client.player.isMemberOfClass("Camera"))
{
%client.camera = %client.player;
}
if (!%client.player.isMemberOfClass(%client.spawnClass))
warn("Trying to spawn a class that does not derive from "@ %client.spawnClass);