Commit Graph
2211 Commits
Author SHA1 Message Date
AsdowandGitHub d296789929 LOBOT: enemies wear pistol holsters (by Seven) (#271) 2024-01-30 22:53:19 +02:00
AsdowandGitHub c7bd75b60d Merc arrival location fix (#263)
* User center insertion point for merc arrival

instead of initial arrival gridno that is meant only for the very first helidrop arrival at the start of a game.

* Prevent possible nullptr dereference
2024-01-24 00:35:39 +02:00
olafwqqandGitHub fd4b531d53 Fix GetAllForticationGridNo (#259)
It was still returning gridnos as 16-bit integers.
2024-01-02 11:53:29 +02:00
olafwqqandGitHub 4d09bea13e Address two compiler warnings (#258) 2024-01-01 22:43:31 +02:00
AsdowandGitHub 3d5294003a Copy drag info to dummy soldier (#255)
Fixes merc location shifted by one tile during loading a save when A* pathfinding is enabled
2023-12-24 13:48:21 +02:00
AsdowandGitHub f88b07b99b Fix loading item temp files (#245)
Call PruneWorldItems() before sectorinfo gets written to the save file.
Resetting the SF_ITEM_TEMP_FILE_EXISTS  would not transfer correctly into the save file.
2023-10-22 14:52:21 +03:00
AsdowandGitHub 8f454e2aab Container.cpp & .h delete (#242)
* Remove GetFilesInDirectory()
* Remove BuildFileDirectory
* Remove container.cpp & .h

Not used in the code
2023-10-20 21:30:39 +03:00
AsdowandGitHub a47ed9ed55 Correct for loop end condition (#241) 2023-10-19 19:08:39 +03:00
AsdowandGitHub 7483829c65 Merge pull request #236 from 1dot13/container
Remove use of Container.cpp in vsurface, dialogue and event systems
2023-10-10 23:02:49 +03:00
Asdow d6a3a27b58 Address review feedback
* Dialogue control.cpp
* vsurface.cpp
* Event pump.cpp
2023-10-10 19:53:19 +03:00
Asdow 4b1de56b01 Remove #ifdefs for USE_VFS 2023-10-08 16:45:06 +03:00
Asdow 56a55f1bc4 Use std::queue instead of old custom queue
implemented in container.cpp
2023-10-07 18:53:39 +03:00
AsdowandGitHub b8a870df02 Reduce code duplication (#233)
* Use ConvertGridNoToCenterCellXY instead of CenterX & CenterY

* Add direction utility function

We have a lot of places in the code that calculate direction based on center cell coordinates, but lack a utility function for it similar to other direction methods.

* Use utility function for calculating direction

* Use ConvertGridNoToCenterCellXY

* Use utility function for direction

* Use ConvertGridNoToCenterCellXY instead of CenterX & CenterY

* Use ConvertGridNoToCenterCellXY instead of CenterX & CenterY

* Remove CenterX & CenterY functions

Use ConvertGridNoToCenterCellXY instead

* Remove CenterX & CenterY calls from UB configuration

* Address review feedback

* Remove duplicate function

ConvertGridNoToCenterCellXY and ConvertMapPosToWorldTileCenter do the exact same thing

* Use PythSpacesAway instead of GetRangeFromGridNoDiff

Both functions calculate the same thing

* Remove GetRangeFromGridNoDiff

* Remove calls to abs()

The values end up being squared anyways making these unnecessary
2023-10-07 15:14:15 +03:00
Marco Antonio Jaguaribe Costaandmajcosta b68f206969 remove annoying warning on MSVC 19.37.32822
`register` keyword does exactly nothing:
https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/c5033?view=msvc-170
2023-10-07 09:13:55 -03:00
Andrzej FałkowskiandGitHub 8d49e74df4 Face gear render fixes (#232)
* Face gear is shaded the same as a face

* Render continue button above icons and facegear

* Face gear rendered below "hatch" (inactivity overlay)

* Consistent naming
2023-10-03 15:20:36 +03:00
Andrzej FałkowskiandGitHub 14ec138fc7 Fixed UI movement mode not switching to crawl on character collapse, leading to deadlocks (#231) 2023-10-02 19:32:15 +03:00
Andrzej FałkowskiandGitHub a3be3ecd7e Specific drug types and drug items for background and facilities. (#226) 2023-10-02 19:30:59 +03:00
sun-alf 5bfd19e5a8 [Fix] One of optimizations in (2482234e) commit is not suitable for MOLLE stuff in 1.13
It is revealed, MOLLE things in 1.13 are configured in XMLs using both NAS and OAS (old attachment system) methods even if NAS is enabled in New Game Options. Given this, logic of SetAttachmentSlotsFlag() cannot be splitted onto NAS and OAS parts, and both Attachment[] and AttachmentPoints must be checked disregarding the NAS option.
2023-09-14 01:04:55 +03:00
sun-alf f8637e5972 [~] Performance optimizations around Attachment[] and Launchable[] arrays
AIMNAS with its ~50K elements in Attachment[] suffered of performance drop when MOLLE stuff is in the visible inventory. To resolve it the following is done:
* Introduce gMAXATTACHMENTS_READ with actual number of elements in Attachment[]; according refactoring.
* Introduce gMAXLAUNCHABLES_READ with actual number of elements in Launchable[]; according refactoring.
* Introduce std::multimap AttachmentBackmap for quick access to attachments using itemId as a key.
* Sort Attachment[] by attachmentIndex right after loading from XML. According order in XML is not needed anymore.
* Introduce FindAttachmentRange() for quick access to attachments using attachmentId as a key (binary search in Attachment[]).
In a few words, GetHelpTextForItemInLaptop(), ValidAttachment(), SetAttachmentSlotsFlag() were heavily optimized.
2023-09-08 21:58:14 +03:00
AsdowandGitHub fc5573f73d Correct check for stance (#222)
Same issue as in commit 23ceb0f
2023-09-05 18:57:40 +03:00
AsdowandGitHub 23ceb0fa4c Fix bug in OCTH prone CTH calculation (by Seven) (#221)
GetToHitBonus() expects BOOLEAN for fProneStance argument, with no comparison to ANIM_PRONE, the ubEndHeight ends up adding bipod bonuses to *all* stances
2023-09-05 17:33:42 +03:00
KittyandGitHub 5740a0af08 Merge pull request #214 from andrzejfalkowski/face-gear-offset-fix
Face gear offset fix
2023-08-30 19:42:55 +02:00
Andrzej Fałkowski ee3d2472e7 Removed unnecessary offset for face gear 2023-08-29 21:25:14 +02:00
Andrzej FałkowskiandGitHub 7edecd6849 Fixed vehicle body not properly removed when destroyed during ramming (#210) 2023-08-28 16:26:46 +03:00
Andrzej FałkowskiandGitHub d56288e313 Fixed incorrect vehicle group id after reloading the game and vehicle movement plot issues. (#207) 2023-08-28 16:26:34 +03:00
kitty624 1289c399ce Update XML.h
- added path to sub-directory for Extra Items
- to avoid cluttering up the parent directory when using this feature
- it allows to place extra items in sector via xml and based on difficulty level
- the new directory "ExtraItems" will contain more details on how-to-use
2023-08-22 00:22:20 +02:00
Andrzej FałkowskiandGitHub 1e1d456fd2 Prevent deadlocks due to self-healing interactive spots and self-attacking (#205) 2023-08-21 19:44:02 +03:00
rftrdevandGitHub b91871b518 Move grenade bonuses from Demolitions to Throwing (#202)
* Copy grenade settings from demolitions to throwing

* Fix setting strings

* Add throwing bonuses to the same spots as demolitions

* Delete grenade bonuses from Demolitions

* Update text

* Reapply throwing check
2023-08-11 11:27:29 -07:00
rftrdevandGitHub aaeea9aac8 Replace evolution with growth rates (#201) 2023-08-09 18:36:44 -07:00
majcostaandGitHub c8c7066969 Refactor merc backpack checking in FindBestPath (#162)
* remove unused fNonFenceJumper from AstarPathfinder::GetPath

* Extract backpack check into function and flip logic

Avoiding double negatives is nice
2023-07-28 12:07:25 -03:00
AsdowandGitHub 2163a66169 Prevent writing past array capacity (#185)
Game would crash with stack-based buffer overrun when a MOLLE item had enough attachments and their texts were written past attachString capacity
2023-07-25 14:19:30 +03:00
rftrdevandGitHub 06d4b53d3e New option: Reduced stat growth at high levels (#183)
Add optional stat growth reduction at 80+ and 90+

This makes mercs with high base stats more valuable as it is harder to grow to their levels
2023-07-21 22:53:40 -07:00
Shad000wandGitHub 0e4d0a9bfb fix for issue #105, turned out that the issue happened due to the vanilla code that was using gTacticalStatus.uiFlags & GODMODE despite it was never actually implemented by SirTech. I changed it to only work gainst player mercs so militia and npcs can damage each other again. (#174) 2023-07-07 01:40:33 -07:00
rftrdevandGitHub fb03cba2fa New feature: transport groups (#172)
https://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=365395
2023-07-04 20:58:56 -07:00
rftrdevandGitHub 8d3e6fce40 Change initial militia orders from STATIONARY to ONGUARD (#171) 2023-06-26 02:22:40 -07:00
AsdowandGitHub 82aa1a6f7d Fix bug that prevented arms dealer inventory from restocking (#169)
if (numTotalItems.count(usItemIndex) == 1 ) would prevent dealers to reorder items if their current stock was zero
2023-06-22 15:59:27 +03:00
Marco Antonio Jaguaribe Costaandmajcosta 764d2f9389 remove int AStarPathFinder::CalcG(int*) function
not being called by anyone at the moment
2023-06-03 22:01:38 -03:00
sun-alfandGitHub 481e518790 Merge pull request #157 from 1dot13/master_1dot13
[Fix] Incorrect displaying info and tooltips in Advances Properties Tab
2023-05-29 21:46:38 +02:00
AsdowandGitHub 986d280193 Enable bigger squad sizes for 720p resolution (#160) 2023-05-28 16:32:12 +03:00
NorthFuryandmajcosta 1c82efb797 use isTooltipScalingEnabled for soldier tooltips 2023-05-27 21:52:35 -03:00
NorthFuryandmajcosta 456cfa18cf added option to scale tooltip rendering 2023-05-27 21:52:35 -03:00
rftrdevandGitHub c13a44c445 Add version to asserts screen (#158)
* Add version info to asserts

* Add gMAXITEMS_READ to arms dealer init assert
2023-05-27 12:02:54 -07:00
sun-alf 9fc9d1c6e8 [Fix] Incorrect displaying info and tooltips in Advances Properties Tab
* Tooltips were shifted by one position due to wrong handling "Accuracy modifier".

* DrawAdvancedValues():
    if ( iFloatModifier[0] > 1.0 || ( fComparisonMode && iComparedFloatModifier[0] > 1.0 ) )
it checks number of laser range tiles  (iFloatModifier[0] > 1.0, "meters" / CELL_X_SIZE) right before actual drawing a line with values. So if someone put 1..9 into XML (<BestLaserRange>) it will not print that value. But number of "meters" was checked (like x > 0) everywhere prior to this code.
so all the code before decided to draw line with icon for laser range, but the guilty code line didn't
I suppose not to draw laser info at all if a modder screwed up <BestLaserRange> putting a 1..9 value
so all values 0..9 basically mean 0 tiles, i.e. there is no laser ability.
2023-05-27 21:04:17 +03:00
AsdowandGitHub f2ab296b49 Display icon and tooltip for belt fed weapons (#155) 2023-05-26 08:12:55 +03:00
AsdowandGitHub 66c7fc1c8d Remove compiler warning for exceeding stack size (#154)
Use std::map & std::set instead of two 16001 elements long arrays
2023-05-25 23:36:55 +03:00
AsdowandGitHub e4e1d472fd Remove compiler warning for exceeding stack size. (#153)
* Use std::map instead of 16001 elements long array
* Remove old commented out code
2023-05-25 22:46:18 +03:00
sun-alf ab2a26accb [Fix] A bunch of fixes for artillery strike
* Avoid using hard-coded Signal and HE mortar shell indices. This caused art.strikes malfunctioning in item mods.
* Trim max nubers of waves to duration of signal smoke. Otherwise art.strike turns into unnatural stupidity.
* If enemy AI tried to get art.strike but lacked of resources, player will not a warning anymore.
2023-05-22 22:06:18 +03:00
AsdowandGitHub 35bb9a70ec Do not load language specific icon file (#146)
Unnecessary, as there is no translated text in the image files
2023-05-19 16:47:42 +03:00
AsdowandGitHub 690d2054c6 Added new filters for LOBOT (#145)
* Weapon class for SECONDHANDPOS items
* Check if weapon is two handed for HANDPOS and SECONDHANDPOS
2023-05-18 23:33:17 +03:00
rftrdevandGitHub a0aa58f9e5 Update disease flags (hand and face) so that they can be used on the same item (#143)
* Allow an item to have both disease flags enabled

* Remove extra line break for disease hand protection helptext
2023-05-15 00:51:37 -07:00