mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2026-01-10 02:40:46 +00:00
[WIP] Replace appearance data with individual fields
Storing certain things in appearance data and others in their own fields was gross. Now everything is stored on the same level and functions have been added to generate appearance data when it's needed by the client.
This commit is contained in:
@@ -33,7 +33,7 @@ static void movePlayer(CNSocket* sock, CNPacketData* data) {
|
||||
// [gruntwork] check if player has a follower and move it
|
||||
if (TableData::RunningNPCPaths.find(plr->iID) != TableData::RunningNPCPaths.end()) {
|
||||
BaseNPC* follower = TableData::RunningNPCPaths[plr->iID].first;
|
||||
Transport::NPCQueues.erase(follower->appearanceData.iNPC_ID); // erase existing points
|
||||
Transport::NPCQueues.erase(follower->id); // erase existing points
|
||||
std::queue<Vec3> queue;
|
||||
Vec3 from = { follower->x, follower->y, follower->z };
|
||||
float drag = 0.95f; // this ensures that they don't bump into the player
|
||||
@@ -45,7 +45,7 @@ static void movePlayer(CNSocket* sock, CNPacketData* data) {
|
||||
|
||||
// add a route to the queue; to be processed in Transport::stepNPCPathing()
|
||||
Transport::lerp(&queue, from, to, NPC_DEFAULT_SPEED * 1.5); // little faster than typical
|
||||
Transport::NPCQueues[follower->appearanceData.iNPC_ID] = queue;
|
||||
Transport::NPCQueues[follower->id] = queue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user