mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-05 09:49:14 +00:00
ASYLUM: check if object exists
On level 13, the game tries to set transparency of an object which doesn't exist (id 4562)
This commit is contained in:
parent
cc41cfb459
commit
fe40af0f44
@ -1806,6 +1806,10 @@ IMPLEMENT_OPCODE(UpdateTransparency)
|
||||
if (cmd->param2 >= 0 && cmd->param2 <= 3) {
|
||||
if (cmd->param1) {
|
||||
Object *object = getWorld()->getObjectById((ObjectId)cmd->param1);
|
||||
if (!object) {
|
||||
warning("No object with id %d", cmd->param1);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!cmd->param2)
|
||||
object->setTransparency(0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user