You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AA trucks are calculated in the tooltip as 2*staticCrew price + vehSDKTruck price * staticAAteamPlayer price, with what I think is a matching funds check in addFIAsquadHC. However, spawnHCGroup calculates the vehicle price component as simply the price of the spawned vehicle type, which is much lower: vehSDKTruck price for vanilla, or 0 for anything else, as vehSDKAA lacks a price definition.
Not sure on the best fix. vehSDKAA could gain a price definition, but unless that's synchronised with truck + static then that may cause trouble in the future. Vanilla would either need a special case or processing of attached objects.
How to reproduce
Recruit a rebel AA truck in vanilla.
Recruit a rebel AA truck in RHS.
Version
2.5.3
Have you altered the code?
No
What i have changed
No response
Map
Doesn't matter
What server?
LAN Hosted
Time bug occured (Server time/UTC)
No response
Mods
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
### What type of PR is this.
1. [X] Bug
2. [ ] Change
3. [ ] Enhancement
### What have you changed and why?
Both constructed and single-vehicle AA trucks were being underpriced on purchase due to not calculating truck + static AA costs as the other code did. This PR fixes this for both cases with a horrible hack.
**Edit:** Additional vehicle price bugs fixed:
- Fixed doubled check price for AA and AT vehicles (missing isInfantry check).
- Fixed AT car check price adding SDKTruck price.
- Fixed ancient bug where zu-23 rebel AA trucks were not refunded on dismissal.
- Fixed bug where vanilla AA trucks were double-refunded.
- Fixed misleading error message when you didn't have enough money to purchase a transport vehicle.
- Fixed wrong price shown for transport vehicle.
- Fixed squad mortars and MGs not being charged for.
### Please specify which Issue this PR Resolves.
closes#2150closes#2152
### Please verify the following and ensure all checks are completed.
1. [X] Have you loaded the mission in LAN host?
2. [ ] Have you loaded the mission on a dedicated server?
### Is further testing or are further changes required?
1. [X] No
2. [ ] Yes (Please provide further detail below.)
Notes:
* Horrible fix for AA truck prices
* Fix multiple rebel squad-vehicle price checking bugs
* Fix more HC squad price bugs
* Don't try to refund weird attached objects on HC dismissal
Describe the bug
AA trucks are calculated in the tooltip as 2*staticCrew price + vehSDKTruck price * staticAAteamPlayer price, with what I think is a matching funds check in addFIAsquadHC. However, spawnHCGroup calculates the vehicle price component as simply the price of the spawned vehicle type, which is much lower: vehSDKTruck price for vanilla, or 0 for anything else, as vehSDKAA lacks a price definition.
Not sure on the best fix. vehSDKAA could gain a price definition, but unless that's synchronised with truck + static then that may cause trouble in the future. Vanilla would either need a special case or processing of attached objects.
How to reproduce
Version
2.5.3
Have you altered the code?
No
What i have changed
No response
Map
Doesn't matter
What server?
LAN Hosted
Time bug occured (Server time/UTC)
No response
Mods
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: