mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 12:05:11 +00:00
Fix behavior check in packet_object
This commit is contained in:
parent
7a7a3c4223
commit
2b4a4a6cd8
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue