Prevent rare bug where a remote player will grab a non-grabbable object momentarily
This commit is contained in:
parent
e24ef194a4
commit
0343532590
|
@ -303,6 +303,8 @@ void mario_stop_riding_object(struct MarioState *m) {
|
|||
void mario_grab_used_object(struct MarioState *m) {
|
||||
if (m->usedObj == NULL || m->usedObj->oHeldState == HELD_HELD) { return; }
|
||||
if (m->heldObj == NULL && m->usedObj != NULL) {
|
||||
// prevent grabbing a non-grabbable object
|
||||
if (!(m->usedObj->oInteractType & INTERACT_GRABBABLE)) { return; }
|
||||
m->heldObj = m->usedObj;
|
||||
m->heldObj->heldByPlayerIndex = m->playerIndex;
|
||||
obj_set_held_state(m->heldObj, bhvCarrySomething3);
|
||||
|
|
Loading…
Reference in New Issue