mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-21 18:11:11 +00:00
Client-side prediction of inventory changes, and some inventory menu fixes
This commit is contained in:
parent
1efdc36b22
commit
b4dd5d3bd7
8 changed files with 210 additions and 57 deletions
|
@ -102,6 +102,7 @@ struct InventoryAction
|
|||
virtual void serialize(std::ostream &os) const = 0;
|
||||
virtual void apply(InventoryManager *mgr, ServerActiveObject *player,
|
||||
IGameDef *gamedef) = 0;
|
||||
virtual void clientApply(InventoryManager *mgr, IGameDef *gamedef) = 0;
|
||||
};
|
||||
|
||||
struct IMoveAction : public InventoryAction
|
||||
|
@ -142,6 +143,8 @@ struct IMoveAction : public InventoryAction
|
|||
}
|
||||
|
||||
void apply(InventoryManager *mgr, ServerActiveObject *player, IGameDef *gamedef);
|
||||
|
||||
void clientApply(InventoryManager *mgr, IGameDef *gamedef);
|
||||
};
|
||||
|
||||
struct IDropAction : public InventoryAction
|
||||
|
@ -175,6 +178,8 @@ struct IDropAction : public InventoryAction
|
|||
}
|
||||
|
||||
void apply(InventoryManager *mgr, ServerActiveObject *player, IGameDef *gamedef);
|
||||
|
||||
void clientApply(InventoryManager *mgr, IGameDef *gamedef);
|
||||
};
|
||||
|
||||
struct ICraftAction : public InventoryAction
|
||||
|
@ -203,6 +208,8 @@ struct ICraftAction : public InventoryAction
|
|||
}
|
||||
|
||||
void apply(InventoryManager *mgr, ServerActiveObject *player, IGameDef *gamedef);
|
||||
|
||||
void clientApply(InventoryManager *mgr, IGameDef *gamedef);
|
||||
};
|
||||
|
||||
// Crafting helper
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue