Asdow
10fa5f37d6
Formatting
2025-11-23 18:28:17 +02:00
Asdow
0d8873d2c0
Remove unused includes
2025-11-23 18:28:17 +02:00
Asdow
f2b88ef080
Remove duplicate include
2025-11-23 18:28:17 +02:00
Asdow
1e6586f187
Set functions static
2025-11-23 18:28:17 +02:00
Asdow
dbb1c0a929
Formatting
2025-11-23 18:28:17 +02:00
Asdow
91ae6e1223
Remove unused includes
2025-11-23 18:28:17 +02:00
Asdow
04bf102614
Remove duplicate include
2025-11-23 18:28:17 +02:00
Asdow
677b320534
Set functions static
2025-11-23 18:28:17 +02:00
Asdow
265a7c0af7
Remove unused function declaration
2025-11-23 18:28:17 +02:00
Asdow
04b1937caa
Fix function definition
2025-11-23 18:28:17 +02:00
Asdow
842009ab3f
Make function static
2025-11-23 18:28:17 +02:00
Asdow
f27164b9dc
Remove unused includes
2025-11-23 18:28:17 +02:00
Asdow
20ee284e42
Remove transitive include
2025-11-23 18:28:17 +02:00
Asdow
ec6401ee5d
Initialize variables
2025-11-23 18:28:17 +02:00
Asdow
d8d3db89d2
Make functions static
2025-11-23 18:28:17 +02:00
Asdow
af1ad3885f
Fix typo
2025-11-23 18:28:17 +02:00
Asdow
0199084f05
Remove commented out extern
2025-11-23 18:28:17 +02:00
Asdow
1db9af545c
Remove commented out function
2025-11-23 18:28:17 +02:00
Asdow
951a88e947
Combine JA2UB includes with its function declaration ifdef
2025-11-23 18:28:17 +02:00
Asdow
b6e276ac34
Formatting & whitespace
2025-11-23 18:28:17 +02:00
Asdow
3a3b415cc5
Remove unused includes
2025-11-23 18:28:17 +02:00
Asdow
d0b86e69d8
Combine JA2UB ifdef includes
2025-11-23 18:28:17 +02:00
Asdow
10f6a48f50
Remove duplicate includes
2025-11-23 18:28:17 +02:00
Asdow
18dfda46f2
Remove unused function declarations and commented out functions
2025-11-23 18:28:17 +02:00
Asdow
4e24a6b9ba
Fix nullptr dereference when spotting mines
2025-11-22 17:10:58 +02:00
Asdow
3061237e58
Fix Debug build includes
2025-11-22 16:11:45 +02:00
Asdow
d05e9ec916
Fix actionitem conversion
2025-11-22 16:06:20 +02:00
Asdow
8fe051dc8d
Declare functions static
2025-11-19 21:11:19 +02:00
Asdow
9c9d6ebb4a
Remove unused includes
2025-11-19 21:11:19 +02:00
Asdow
8bda0aaaf3
Remove unused includes
2025-11-19 21:11:19 +02:00
Asdow
fc824fb556
Declare functions static
2025-11-19 21:11:19 +02:00
Asdow
e3845520f8
Remove unused includes
2025-11-19 21:11:19 +02:00
Asdow
fa8e3113fe
Declare function static
2025-11-19 21:11:19 +02:00
Asdow
62fbf90daa
Remove unnecessary function declaration
2025-11-19 21:11:19 +02:00
Asdow
10ac8624fe
Move ExecuteAdditionalCharacterDialogue defintion before the first call
...
This allows us to declare it static
2025-11-19 21:11:19 +02:00
Asdow
4e60877add
Declare compatible functions static
2025-11-19 21:11:19 +02:00
Asdow
740a1a8851
Remove duplicate include
2025-11-19 21:11:19 +02:00
Asdow
55afb83eb2
Move UB specific header under UB #ifdef
2025-11-19 21:11:19 +02:00
Asdow
dfd5cfd42e
Remove unused includes
2025-11-19 21:11:19 +02:00
Asdow
518f7959aa
Remove commented out include
2025-11-19 21:11:19 +02:00
Asdow
f4f1bb25b6
Replace transitive include with explicit
2025-11-19 21:11:19 +02:00
Asdow
731f3a7d99
Remove unused includes
2025-11-19 21:11:19 +02:00
Asdow
cf048f9629
Remvoe unused includes
2025-11-19 21:11:19 +02:00
Asdow
34a369938b
Declare compatible functions static
2025-11-19 21:11:19 +02:00
Asdow
2979f49e8d
Remove unused includes
2025-11-19 21:11:19 +02:00
Asdow
0dc080b01d
Declare compatbile function static
2025-11-19 21:11:19 +02:00
Asdow
014b06641e
Remove unused function declarations
2025-11-19 21:11:19 +02:00
Asdow
56d4499262
Remove unused includes
2025-11-19 21:11:19 +02:00
Asdow
92c58d9fb6
Declare compatible function static
2025-11-19 21:11:19 +02:00
Asdow
330470353c
Remove unused include
2025-11-19 21:11:19 +02:00
Asdow
7c274fd87a
Declare compatible functions static
2025-11-19 21:11:19 +02:00
Asdow
5e28730c2a
Make fallthrough explicit
2025-11-19 21:11:19 +02:00
Asdow
fccb2e15bd
Replace transitive include with explicit
2025-11-19 21:11:19 +02:00
Asdow
e354885b16
Remove unused includes
2025-11-19 21:11:19 +02:00
Asdow
056fc5ea6e
Remove unused function declaration
2025-11-19 21:11:19 +02:00
Asdow
2c50518b61
Make compatible function static
2025-11-19 21:11:19 +02:00
Asdow
803ee8d90b
Declare compatible function static
2025-11-19 21:11:19 +02:00
Asdow
243e22a8c6
Remove unused includes
2025-11-19 21:11:19 +02:00
Asdow
d85643b895
Initialize local variable
2025-11-19 21:11:19 +02:00
Asdow
413eaa08fb
Declare compatible functions static
2025-11-19 21:11:19 +02:00
Asdow
08c82aa056
Remove unused local variable
2025-11-19 21:11:19 +02:00
Asdow
03e4898061
Declare compatible functions static
2025-11-19 21:11:19 +02:00
Asdow
6799d68b3c
Remove duplicate includes
2025-11-19 21:11:19 +02:00
Asdow
5f6114fed9
Remove unused files
2025-11-19 21:11:19 +02:00
Asdow
eace375a3b
Remove unused function declaration
2025-11-19 21:11:19 +02:00
Asdow
419f9f3bf5
Remove duplicate includes
2025-11-19 21:11:19 +02:00
Asdow
9e4b819f69
Declare compatible functions static
2025-11-19 21:11:19 +02:00
Asdow
8296bfbf8a
Move Handle UI.h include under JA2UB define
2025-11-19 21:11:19 +02:00
Asdow
12250a34ae
Remove unused includes
2025-11-19 21:11:19 +02:00
Asdow
9f7b545528
Combine search loops into one
...
Reduces code duplication and fixes an illegal memory access that was still present.
2025-11-19 13:57:41 +02:00
Asdow
f902b01497
Fix ubID underflow
...
Fixes illegal memory access if we tried to find previous merc and our currently selected one has ubID == 0
2025-11-19 10:12:53 +02:00
Asdow
0bbb01ae87
Fix pTeamSoldier initialization
2025-11-18 17:39:27 +02:00
Asdow and GitHub
264105071a
Load old ObjectData correctly ( #553 )
...
* Load old ObjectData correctly
ITS changed ObjectDataStructs::OBJECT_BOMBS_AND_OTHER::ubBombOwner data size from 1 byte to 2 bytes, and it was not taken into account when loading ObjectData
2025-11-11 20:14:46 +02:00
Asdow
584f6b47e6
Supply ProfileID to LUA scripts instead of SoldierID
...
Lua scripts expect to receive the same profileID value back from l_FindSolderByProfileID() that is supplied to it on the script side. This is a bit suboptimal as we constantly keep searching for the correct soldier on different calls to C++ side with the way it works now.
2025-10-11 11:43:37 +03:00
Asdow
da83c6a557
Fix power gen fan sound
...
* Stop fan sound when switching sector
* Start fan sound when loading a save where current sector is power gen sector
2025-10-06 22:09:39 +03:00
Asdow
710941edd3
Dynamically adjust contract box position
...
Create contract renewal box right next to mouse position. Small QoL change to have the box closer.
2025-10-03 23:47:15 +03:00
Asdow
0b0fffa21d
Improve multiselection contract renewal
...
* Contract duration lines are greyed out if the player lacks funds
*Selecting a mix of AIM and other merc types allows renewing contracts for selected AIM mercs
* Multiselection of only mercs whose contracts are not renewable (IMPs, rebels, etc) will have greyed out contract lines
2025-10-03 23:47:15 +03:00
Asdow
e1acf181df
Add FIXME
2025-09-29 11:58:55 +03:00
Asdow
0f8c14e72e
Remove FindSoldierByProfileID_()
...
All the calls where this was used are functionally identical when we just supply UID to the original FindSoldierByProfileID() call with fPlayerMercsOnly set to FALSE
2025-09-29 11:58:55 +03:00
Asdow
ecea18f57c
Add FIXME to l_ActionInProgress
2025-09-29 11:58:55 +03:00
Asdow
e63e936715
Clean up
...
* Removed superfluous for-if loops
* Wrapped function contents inside if(lua_gettop(L)) scopes similar to other, already fixed functions
* Harmonized whitespace
* Added FIXMEs to two unfinished functions
2025-09-29 11:58:55 +03:00
Asdow
a15ed3aceb
Fix l_SoldierGiveItem(lua_State* L)
...
Don't use SoldierID when matching for profile id
2025-09-29 11:58:55 +03:00
Asdow
0cb13650ed
Fix whitespace formatting
2025-09-29 11:58:55 +03:00
Asdow
601ef4dc30
Remove duplicate includes
2025-09-29 11:58:55 +03:00
Asdow
8fa2189a66
Fix schedule compatibility between map versions 7 & 8
2025-09-28 10:35:13 +03:00
Asdow
fb34eb6776
Use SoldierID for checks
2025-09-28 00:34:07 +03:00
Asdow
35984f57d0
Check for valid ubAttacker
2025-09-27 23:57:14 +03:00
Asdow
6c42f222e1
Fix PBI when enemy attacks starting sector in tactical view
...
When enemy attacks the starting sector and player is in tactical view. We go from tactical to strategic screen to show the prebattle interface instead of staying in tactical. The game errors on the sector assert when trying to draw the glowing red locator around the sector just before displaying the prebattle interface.
Normally the sector gets set properly when compressing time for the first time in a new game start but due to UB going into playing the intro video, it skips the call to HandleTimeCompressWithTeamJackedInAndGearedToGo() that would eventually set it. Neither can we rely on setting the sector when initiating the prebattle interface since MapScreenHandle() tries to display the locator before the PBI gets initialized.
2025-09-27 01:01:23 +03:00
Asdow
1f6e545a39
Make enemy battle sound respect speech volume setting
2025-09-25 23:26:29 +03:00
Asdow
2b9efd3702
Make helicopter sound respect sound effect volume setting
...
Helicopter sound would play upon heli insertion even if sound effects volume was set to 0 in options.
2025-09-25 22:55:33 +03:00
Asdow
f5a7c32bff
Use SoldierID instead of pSoldier
...
ContinueDialogue was possible to be called with pSoldier that isn't null but is not valid pointer to MercPtrs array resulting in debugger catching an illegal memory access.
2025-09-25 22:47:51 +03:00
Asdow
d21b487884
Fix include filenames
2025-09-25 13:06:18 +03:00
Asdow
a161dcc509
Fix selecting soldiers via right click in editor
2025-09-25 10:17:04 +03:00
Asdow
f3b99edbff
Fix Debug build
2025-09-24 19:21:58 +03:00
Asdow
f47908e033
Fix debug mode defines
...
JA2BETAVERSION gets defined in cmake depending on selected config
2025-09-24 19:21:58 +03:00
Asdow and GitHub
f52ab32952
Merge pull request #331 from 1dot13/ExtraMercs
...
Increased Team Sizes (ITS)
2025-09-24 17:07:51 +03:00
Asdow
82aca548f5
Merge branch 'master' into ExtraMercs
2025-09-24 16:14:10 +03:00
Asdow
f3194718e4
Remove useless check for savegame version
...
ITS breaks save games.
2025-08-08 21:21:48 +03:00
Asdow
fd9611ae04
Remove compiler warnings
2025-08-08 18:38:53 +03:00
Asdow
c62d767622
Update to Master
2025-08-08 18:00:31 +03:00