Commit Graph
1214 Commits
Author SHA1 Message Date
Asdow cb27d0cd72 Set functions static 2025-12-03 23:52:05 +02:00
Asdow 020cd270c0 include cleanup 2025-12-03 23:52:05 +02:00
Asdow a6e1b93af0 Set functions static 2025-12-03 23:52:05 +02:00
Asdow 5dd4043f00 Formatting 2025-12-03 23:52:05 +02:00
Asdow 61f8efaac0 include cleanup 2025-12-03 23:52:05 +02:00
Asdow 3ee22bdb31 Set functions static 2025-12-03 23:52:05 +02:00
Asdow 032ac8e566 Remove forward declarations that are included already 2025-12-03 23:52:05 +02:00
Asdow 1e78fc68bc Formatting 2025-12-03 23:52:05 +02:00
Asdow a074dbf3ee include cleanup 2025-12-03 23:52:05 +02:00
Asdow c1b8309753 Expand UB_SetNumberJa25EnemiesInSurfaceSector
* Allow adding jeeps and robots to sectors now
* From Lua side, it is now possible to add differing amount of arguments to the function. Minimum required is 3 (sector x & y and amount of admins)
So all of the following examples will work correctly:

- UB_SetNumberJa25EnemiesInSurfaceSector( x, y, ubNumAdmins )

- UB_SetNumberJa25EnemiesInSurfaceSector( x, y, ubNumAdmins, ubNumTroops )

- - UB_SetNumberJa25EnemiesInSurfaceSector( x, y, ubNumAdmins, ubNumTroops,ubNumElites )

- UB_SetNumberJa25EnemiesInSurfaceSector( x, y, ubNumAdmins, ubNumTroops,ubNumElites, ubNumTanks )

- UB_SetNumberJa25EnemiesInSurfaceSector( x, y, ubNumAdmins, ubNumTroops,ubNumElites, ubNumTanks , ubNumJeeps )

- UB_SetNumberJa25EnemiesInSurfaceSector( x, y, ubNumAdmins, ubNumTroops,ubNumElites, ubNumTanks , ubNumJeeps, ubNumRobots )
2025-11-29 11:46:45 +02:00
Asdow d86dc39f9f Add enemies also on insane difficulty 2025-11-27 22:38:29 +02:00
Asdow b580459e57 Remove unused local variable 2025-11-27 22:38:29 +02:00
Asdow b562b45c00 Externalize tunnel sectors for adding enemies to 2025-11-27 22:38:29 +02:00
steph-pgandmajcosta b19efcf1b4 Make disease healing a highest prior 2025-10-13 16:19:44 -03: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
Marco Antonio J. Costaandmajcosta 3d29eff4d8 use FormatMoney everywhere 2025-10-08 05:36:37 -03:00
Marco Antonio J. Costaandmajcosta 86ec94b40a stop using sATMText for "Insufficient Funds" message
it is about to go
2025-10-08 03:07:23 -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 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 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 82aca548f5 Merge branch 'master' into ExtraMercs 2025-09-24 16:14:10 +03:00
Marco Antonio J. Costaandmajcosta 4ec012ce7b fix bug where combat doesn't end on team retreat
fixes issue #498 where retreating from combat in a sector that has a merc
inbound via the airdrop marker causes combat not to end

the reason this fails is that a the inbound soldier counts as being in
the sector being retreated from, even though he isn't

I add a check for `MercPtrs[i]->bInSector` so this doesn't happen

that way the function doesn't leave early and CheckForEndOfCombatMode is
reached
2025-09-11 22:00:32 -03:00
Marco Antonio J. Costaandmajcosta ac59eba898 get rid of unnecessary #defines 2025-09-05 20:31:11 -03:00
Marco Antonio J. Costaandmajcosta 7d9cd87da8 fully externalize bQueenLosingControlOfSector 2025-09-02 20:01:47 -03:00
Buscherandmajcosta 1004ab6c8c Added Right Click to time compression to fast forward a single hour 2025-08-24 15:06:10 -03:00
Marco Antonio J. Costaandmajcosta 3c44f133fd Actually fix NOTIFY_IF_SLEEP_FAILS for multiple mercs selected 2025-08-24 07:39:00 -03:00
BeatAroundTheBuscherandGitHub ed00830202 Fixes Upper/Lower Casing for include paths (#487)
* Fixing upper/lower case for includes

types.h, zconf.h and zlib.h were renamed so that global includes like Types.h
are not used.
2025-08-16 22:01:12 -03:00
BeatAroundTheBuscherandGitHub e9b12908f7 ASD/ARC: Fix Error by One in gasCan Vector (#472)
* ASD/ARC: Fix Error by One in gasCan Vector

* Add size check for the gasCan vector as part of ARC

* Remove unused Vectors for ARC
2025-08-15 18:40:43 -07:00
Marco Antonio J. Costaandmajcosta 616d9a08e6 Fix NOTIFY_IF_SLEEP_FAILS for multiple mercs selected 2025-08-12 23:18:49 -03:00
Asdow c62d767622 Update to Master 2025-08-08 18:00:31 +03:00
Asdow d078a3439f Fix squad movement popupbox for increased squads 2025-08-08 17:01:13 +03:00
Asdow 9b83d6a3bc Increase squad amount to 40 2025-08-08 16:39:52 +03:00
Asdow c3a34a660d Check squads are on the same level 2025-08-07 22:02:49 +03:00
AsdowandGitHub 7bb7c54317 Guard against integer underflow (#462) 2025-07-20 17:30:22 -07:00
Asdow 49a56d01ac Load correct militia icons for 720p resolution 2025-07-08 20:21:54 +03:00
Asdow 9d1e9e8948 Fix line highlighting 2025-06-27 20:28:15 +03:00
Asdow 5e2c61ef12 Externalized UB bloodcat quest sector 2025-06-25 22:54:53 +03:00
Asdow a1bb85ca95 Externalize fan exitgrid location in the source sector 2025-06-24 22:54:44 +03:00
Asdow c02bbc90cb Fix helicopter for UB
No need to force an assert error here. We can simply ignore the meanwhile scene just like all the others.
2025-06-18 22:58:17 +03:00
Asdow 8dcb431ef2 Use (0,0) sector coordinates as unused cache
Makes the comment in Mod_Settings.ini valid advice
2025-04-17 23:51:44 +03:00