mirror of
https://github.com/wassname/GarageServer.IO.git
synced 2026-06-27 16:10:34 +08:00
Added ship check if player hasn't had state defined
This commit is contained in:
@@ -35,7 +35,9 @@ $(function () {
|
||||
drawRotatedImage(entity.state.ang, entity.state.x, entity.state.y, entityImage);
|
||||
});
|
||||
playerStates.forEach(function (player) {
|
||||
drawRotatedImage(player.state.ang, player.state.x, player.state.y, ships[player.state.ship]);
|
||||
if (player.state.ship) {
|
||||
drawRotatedImage(player.state.ang, player.state.x, player.state.y, ships[player.state.ship]);
|
||||
}
|
||||
});
|
||||
},
|
||||
//Update Loop
|
||||
|
||||
Reference in New Issue
Block a user