From 349ae6a709768cf3ebc8cbcd463d0de255d0ce12 Mon Sep 17 00:00:00 2001 From: MysterD Date: Sun, 5 Jun 2022 00:24:48 -0700 Subject: [PATCH] Fix behavior check in packet_object --- src/pc/network/packets/packet_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pc/network/packets/packet_object.c b/src/pc/network/packets/packet_object.c index bc0b701f..fc789d54 100644 --- a/src/pc/network/packets/packet_object.c +++ b/src/pc/network/packets/packet_object.c @@ -366,10 +366,11 @@ static struct SyncObject* packet_read_object_header(struct Packet* p, u8* fromLo packet_read(p, &behaviorId, sizeof(u32)); BehaviorScript* behavior = (BehaviorScript*)get_behavior_from_id(behaviorId); + BehaviorScript* lBehavior = (BehaviorScript*)smlua_override_behavior(behavior); if (behavior == NULL) { LOG_ERROR("unable to find behavior %04X for id %d", behaviorId, syncId); return NULL; - } if (o->behavior != behavior && !allowable_behavior_change(so, behavior)) { + } if (o->behavior != behavior && o->behavior != lBehavior && !allowable_behavior_change(so, behavior)) { LOG_ERROR("behavior mismatch for %d: %04X vs %04X", syncId, get_id_from_behavior(o->behavior), get_id_from_behavior(behavior)); return NULL; }