Compare commits
2 Commits
035623c217
...
8ea12d230d
Author | SHA1 | Date | |
---|---|---|---|
8ea12d230d | |||
a404bd765a |
@ -73,7 +73,7 @@ static void *ll_load (lua_State *L, const char *path) {
|
|||||||
|
|
||||||
|
|
||||||
static lua_CFunction ll_sym (lua_State *L, void *lib, const char *sym) {
|
static lua_CFunction ll_sym (lua_State *L, void *lib, const char *sym) {
|
||||||
lua_CFunction f = (lua_CFunction)dlsym(lib, sym);
|
lua_CFunction f = __extension__(lua_CFunction)dlsym(lib, sym);
|
||||||
if (f == NULL) lua_pushstring(L, dlerror());
|
if (f == NULL) lua_pushstring(L, dlerror());
|
||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
|
@ -935,13 +935,19 @@ void Server::handleCommand_InventoryAction(NetworkPacket* pkt)
|
|||||||
setInventoryModified(ma->from_inv, false);
|
setInventoryModified(ma->from_inv, false);
|
||||||
setInventoryModified(ma->to_inv, false);
|
setInventoryModified(ma->to_inv, false);
|
||||||
|
|
||||||
bool from_inv_is_current_player =
|
bool from_inv_is_current_player = false;
|
||||||
(ma->from_inv.type == InventoryLocation::PLAYER) &&
|
if (ma->from_inv.type == InventoryLocation::PLAYER) {
|
||||||
(ma->from_inv.name == player->getName());
|
if (ma->from_inv.name != player->getName())
|
||||||
|
return;
|
||||||
|
from_inv_is_current_player = true;
|
||||||
|
}
|
||||||
|
|
||||||
bool to_inv_is_current_player =
|
bool to_inv_is_current_player = false;
|
||||||
(ma->to_inv.type == InventoryLocation::PLAYER) &&
|
if (ma->to_inv.type == InventoryLocation::PLAYER) {
|
||||||
(ma->to_inv.name == player->getName());
|
if (ma->to_inv.name != player->getName())
|
||||||
|
return;
|
||||||
|
to_inv_is_current_player = true;
|
||||||
|
}
|
||||||
|
|
||||||
InventoryLocation *remote = from_inv_is_current_player ?
|
InventoryLocation *remote = from_inv_is_current_player ?
|
||||||
&ma->to_inv : &ma->from_inv;
|
&ma->to_inv : &ma->from_inv;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user