Commit 69b45d2
committed
fix(animalEvents): fall back to farmId 1 instead of 0 in getFarmId()
g_currentMission.player can be nil on certain modded maps (e.g. Judith
Plains Montana 4X) at the time a wildlife event fires. The previous
fallback returned farmId 0 (the FS25 spectator/no-farm slot), causing
addMoney() to silently discard the transaction with no error or log.
Affected events: wildlife_veterinary_visit, wildlife_stampede,
wildlifeTickHandler (which already had an early-return guard for 0).
Fix: return 1 as the fallback — farm 1 is always the singleplayer/host
farm in FS25.1 parent 95fc734 commit 69b45d2
4 files changed
Lines changed: 14 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
18 | 25 | | |
19 | 26 | | |
20 | 27 | | |
| |||
0 commit comments