Skip to content

Duke3D: Reset all actor vars in prelevel() regardless of the sprite's statnum

Dino Bollinger requested to merge dibollinger/eduke32:actorvar_reset into master

Previously, only sprites with a statnum of 0 would have their per-actor variables reset to the default on map load. This meant that sprites with statnums that were pre-defined in the map would inherit the per-actor var values of the sprites with corresponding indices from the previous map.

Additionally, the per-actor var reset is now performed before EVENT_PRELEVEL, meaning that any changes to actorvar that occur in this event will now persist. Previously, altering actor vars for sprites with statnum 0 in this event would not have any effect, as they would be reset to their defaults afterwards.

Edited by Dino Bollinger

Merge request reports