mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-12-22 12:00:03 +00:00
[refactor] BaseNPC now uses Entity XYZ fields for handling positions
- fixed many references to Entity.appearanceData.i[XYZ] to use the base Entity XYZ values - BaseNPC::enterIntoViewOf grabs the position from the base Entity XYZ values - NPCManager::updateNPCPosition updates the base Entity XYZ values - MobAI.c/deadStep() also sends it's packet based on the Entity XYZ values
This commit is contained in:
@@ -174,7 +174,7 @@ static void eggPickup(CNSocket* sock, CNPacketData* data) {
|
||||
}
|
||||
|
||||
/* this has some issues with position desync, leaving it out for now
|
||||
if (abs(egg->appearanceData.iX - plr->x)>500 || abs(egg->appearanceData.iY - plr->y) > 500) {
|
||||
if (abs(egg->x - plr->x)>500 || abs(egg->y - plr->y) > 500) {
|
||||
std::cout << "[WARN] Player tried to open an egg isn't nearby?!" << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user