mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-10-20 20:30:19 +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:
@@ -77,10 +77,10 @@ class BaseNPC : public Entity {
|
||||
public:
|
||||
sNPCAppearanceData appearanceData = {};
|
||||
|
||||
BaseNPC(int x, int y, int z, int angle, uint64_t iID, int t, int id) { // XXX
|
||||
appearanceData.iX = x;
|
||||
appearanceData.iY = y;
|
||||
appearanceData.iZ = z;
|
||||
BaseNPC(int _X, int _Y, int _Z, int angle, uint64_t iID, int t, int id) { // XXX
|
||||
x = _X;
|
||||
y = _Y;
|
||||
z = _Z;
|
||||
appearanceData.iNPCType = t;
|
||||
appearanceData.iHP = 400;
|
||||
appearanceData.iAngle = angle;
|
||||
|
Reference in New Issue
Block a user