spraycan: actually explain SpawnDecal arg0 thing

This commit is contained in:
emmie 2023-09-13 06:32:15 +00:00 committed by Kiri
parent c453013abf
commit e82101d9cb

View File

@ -405,9 +405,11 @@ class SnekTechSprayerDecalSpawner : Decal
} }
} }
// pass the decal name as a map editor type of argument // SpawnDecal checks arg0 for the decal ID/name.
args[0] = -int(name(actualDecalName)); // gzdoom passes string arguments as negated string table indices, so
// spawn the decal // we need to cast the decal name to a Name (implicitly adding it to
// the string table), then to an int (to get the index).
args[0] = -int(Name(actualDecalName));
Super.SpawnDecal(); Super.SpawnDecal();
// then find every decal that we spawned // then find every decal that we spawned