Removed old sync stuff

This commit is contained in:
Vortrex
2020-12-26 02:03:37 -06:00
parent bc634583ce
commit f236ed732c

View File

@@ -123,37 +123,46 @@ addNetworkHandler("ag.heldKey", function(client, key) {
// ---------------------------------------------------------------------------
addNetworkHandler("ag.player.sync", function(client, position, heading) {
setEntityData(client, "ag.position", position, true);
setEntityData(client, "ag.heading", heading, true);
});
// ---------------------------------------------------------------------------
addNetworkHandler("ag.player.death", function(client, position, heading) {
processPlayerDeath(client);
});
// ---------------------------------------------------------------------------
//addNetworkHandler("ag.player.vehicle", function(client, vehicle) {
// clientEnteredVehicle(client, vehicle);
//});
// ---------------------------------------------------------------------------
addNetworkHandler("ag.veh.sync", function(client, syncId, position, heading) {
//let vehicleData = getVehicleDataFromSyncId(syncId);
//if(vehicleData) {
// vehicleData.syncPosition = position;
// vehicleData.syncHeading = heading;
//}
});
// ---------------------------------------------------------------------------
function updatePlayerNameTag(client) {
triggerNetworkEvent("ag.nametag", null, client.name, getPlayerNameForNameTag(client), getPlayerColour(client), false, client.ping);
}
// ---------------------------------------------------------------------------
function updatePlayerPing(client) {
triggerNetworkEvent("ag.ping", null, client.name, client.ping);
}
// ---------------------------------------------------------------------------
addNetworkHandler("ag.arrivedAtBusStop", function(client) {
arrivedAtBusStop(client);
});
// ---------------------------------------------------------------------------
addNetworkHandler("ag.clientReady", function(client) {
client.setData("ag.isReady", true, false);
console.log(`${getClientDisplayForConsole(client)}'s client resources are downloaded and ready!`);
if(client.getData("ag.isStarted") == true) {
initClient(client);
}
});
// ---------------------------------------------------------------------------
addNetworkHandler("ag.clientStarted", function(client) {
client.setData("ag.isStarted", true, false);
console.log(`${getClientDisplayForConsole(client)}'s client resources are started and running!`);
if(client.getData("ag.isReady") == true) {
initClient(client);
}
});
// ---------------------------------------------------------------------------