Rename some utils to align with code style

This commit is contained in:
Vortrex
2022-04-23 15:13:34 -05:00
parent b355c2093f
commit 56bae04e0f
5 changed files with 44 additions and 27 deletions

View File

@@ -147,7 +147,7 @@ function loadNPCTriggerResponsesFromDatabase(npcTriggerDatabaseId) {
// ===========================================================================
function saveNPCsToDatabase() {
function saveAllNPCsToDatabase() {
if(getServerConfig().devServer) {
return false;
}
@@ -183,11 +183,11 @@ function saveNPCToDatabase(npcDataId) {
if(tempNPCData.ped != false) {
if(!tempNPCData.spawnLocked) {
if(areServerElementsSupported()) {
tempNPCData.spawnPosition = tempNPCData.vehicle.position;
tempNPCData.spawnRotation = tempNPCData.vehicle.heading;
tempNPCData.position = tempNPCData.ped.position;
tempNPCData.heading = tempNPCData.ped.heading;
} else {
tempNPCData.spawnPosition = tempNPCData.syncPosition;
tempNPCData.spawnRotation = tempNPCData.syncHeading;
tempNPCData.position = tempNPCData.syncPosition;
tempNPCData.heading = tempNPCData.syncHeading;
}
}
}