Commit 7dd6c4ba62 (TWP: Fix give minimum distance, 2024-03-07)
increased the maximum distance for allowing objects to be given from 15
to 30. This works fine for most of the game, but there is at least one
instance where 30 prevents a crucial transaction: Ransome exchanging
wallets with Willie. This is visible in the following debug log:
Give 'ransomeWallet' to 'willie'
exec(currentActor,9,ransomeWallet,willie)
noun1.inInventory: YES and noun1.touchable: YES nowalk: NO
walk to obj willie: (1533.000000,91.000000)
walk to obj ransome: 1503.000000,91.000000, 1
Give 'ransomeWallet' to 'willie'
actorArrived
actor arrived with facing 1
call actorArrived callback
actorArrived: exec sentence
actorArrived: noun2 min_dist: 30.265491 > 30.000000 ?
translate(@30087): Willie
sayline: ransome, @24882
talking ransome audio stopped
Give 'ransomeWallet' to 'willie'
talking ransome: @24882
Load lip RANSOME_24882.lip
Lip RANSOME_24882.lip loaded
loadActorSpeech RANSOME_24882.ogg
talking ransome audio id: 250087, dur: 1821
sayLine 'He is too far away.'
Here we can see Ransome moving within 30.27 distance units from Willie
without being obstructed by anything, however this is not close enough
for "give" to work. Let's bump MIN_GIVE_DIST to 35, which fixes the
issue.
- actorDistanceWithin if actors is not in the same room
- add STOP_LOOPING const
- call actorEnter and actorExit
- fix loadDialog
- add name to cutscene
- annoying kid should not stop music when talking with him