Tag that indicates this is compatible with the post-demo release version of Road to Vostok.
Overlapping Effect Areas Fix
Fixes the behavior of Detector.gd's Detect() function which is responsible for keeping track of what effect areas the player is currently in (indoors, near a fire, near a workbench etc.).
The Bug
The original implementation is faulty in its logic; if the player character is inside more than one area, only the area type that's processed last flags the player correctly:
#ORIGINAL CODE
func Detect():
var overlaps = get_overlapping_areas()
if overlaps.size() > 0:
for overlap in overlaps:
if overlap is Area:
if overlap.type == "Indoor":
gameData.indoor = true
else:
gameData.indoor = false
if overlap.type == "Mine":
if !overlap.owner.isDetonated:
overlap.owner.Detonate()
if overlap.type == "Fire":
gameData.isBurning = true
if !gameData.burn:
character.Burn(true)
else:
gameData.isBurning = false
if overlap.type == "Heat":
gameData.heat = true
else:
gameData.heat = false
if overlap.type == "PRX_Heat":
gameData.PRX_Heat = true
else:
gameData.PRX_Heat = false
if overlap.type == "PRX_Workbench":
gameData.PRX_Workbench = true
else:
gameData.PRX_Workbench = false
else:
gameData.indoor = false
gameData.isBurning = false
gameData.heat = false
gameData.PRX_Heat = false
gameData.PRX_Workbench = false
This leads to situations where, for example, if the player is standing next to a fire that's also indoors the player will either be flagged as "near a fire" OR "indoors" (depending on which area is processed last).

Downloads34
Views478
Publish Date19 hours ago
Last Updated19 hours ago by
Version1.0.0
Tags Members
notymeOwner
Comments
