Revert "Use new inHouse in player data"
This reverts commit e249009fc2.
This commit is contained in:
@@ -404,8 +404,8 @@ function getClosestHouseEntrance(position) {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function getPlayerHouse(client) {
|
function getPlayerHouse(client) {
|
||||||
if(getPlayerData(client).inHouse > 0) {
|
if(doesEntityDataExist(client, "ag.inHouse")) {
|
||||||
return getPlayerData(client).inHouse;
|
return getEntityData(client, "ag.inHouse");
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@@ -648,11 +648,7 @@ function getHouseInfoCommand(command, params, client) {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function isPlayerInAnyHouse(client) {
|
function isPlayerInAnyHouse(client) {
|
||||||
if(getPlayerData(client).inHouse > 0) {
|
return doesEntityDataExist(client, "ag.inHouse");
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
@@ -743,7 +739,7 @@ function exitHouse(client) {
|
|||||||
setPlayerDimension(client, getServerData().house[houseId].entranceDimension);
|
setPlayerDimension(client, getServerData().house[houseId].entranceDimension);
|
||||||
setPlayerPosition(client, getServerData().house[houseId].entrancePosition);
|
setPlayerPosition(client, getServerData().house[houseId].entrancePosition);
|
||||||
}
|
}
|
||||||
getPlayerData(client).inHouse = 0;
|
removeEntityData(client, "ag.inHouse");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
@@ -775,15 +771,3 @@ function cacheHouseItems(houseId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function getHouseIdFromDatabaseId(databaseId) {
|
|
||||||
for(let i in getServerData().houses) {
|
|
||||||
if(getHouseData(i).databaseId == databaseId) {
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ===========================================================================
|
|
||||||
Reference in New Issue
Block a user