spraycan: actually explain SpawnDecal arg0 thing

main release_4.11.3c
emmie 2023-09-13 06:32:15 +00:00 committed by Kiri
parent c453013abf
commit e82101d9cb
1 changed files with 5 additions and 3 deletions

View File

@ -405,9 +405,11 @@ class SnekTechSprayerDecalSpawner : Decal
}
}
// pass the decal name as a map editor type of argument
args[0] = -int(name(actualDecalName));
// spawn the decal
// SpawnDecal checks arg0 for the decal ID/name.
// gzdoom passes string arguments as negated string table indices, so
// 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();
// then find every decal that we spawned