Commit Graph
2266 Commits
Author SHA1 Message Date
Asdow 75deccbc44 Convert SOLDIERTYPE::ubRobotRemoteHolderID to SoldierID 2024-11-15 23:56:26 +02:00
Asdow 566ead5815 Convert SOLDIERTYPE::ubTargetID to SoldierID 2024-11-15 23:46:15 +02:00
Asdow f823cb9718 Update Soldier Control.h 2024-11-15 23:32:13 +02:00
Asdow 5de6f77f2e Convert SOLDIERTYPE::ubOppNum to SoldierID 2024-11-15 23:26:22 +02:00
Asdow 1a172427ef Update Soldier Create.cpp 2024-11-15 23:01:52 +02:00
Asdow 8346d5bfa1 Convert SOLDIERTYPE->ubNextToPreviousAttackerID to SoldierID 2024-11-15 22:58:25 +02:00
Asdow 131172e41a Convert SOLDIERTYPE->ubPreviousAttackerID to SoldierID 2024-11-15 22:54:44 +02:00
Asdow ee429fd1f4 Convert SOLDIERTYPE->ubAttackerID to SoldierID 2024-11-15 22:51:48 +02:00
Asdow 9079f2e0c1 Whitespace changes to SOLDIERTYPE 2024-11-15 21:20:49 +02:00
Asdow ecb29ae9bc Convert SOLDIERTYPE->usChatPartnerID to SoldierID 2024-11-15 21:09:17 +02:00
Asdow 83b3485e58 Convert prisonerdialoguetargetID to SoldierID 2024-11-15 21:04:05 +02:00
Asdow b98732daa7 Convert gusSelectedSoldier to SoldierID 2024-11-15 19:06:34 +02:00
Asdow e9c8124dc2 Fix UB compilation 2024-11-15 19:05:19 +02:00
Asdow 337cf1804f Update Overhead Types.h 2024-11-15 01:32:35 +02:00
Asdow b9deb3cc19 PossiblyStartEnemyTaunt( uiTargetId ) to SoldierID 2024-11-15 01:31:22 +02:00
Asdow 6a0d02e9b9 Change type from BOOLEAN(!) to SoldierID 2024-11-15 01:03:21 +02:00
Asdow 568aa0a0b8 Update Item Types.cpp 2024-11-15 00:04:39 +02:00
Asdow 1345d92521 Convert Soldier Find.cpp to SoldierID 2024-11-14 00:45:50 +02:00
Asdow 0103a871cc Operator overloads for accessing SOLDIERTYPE* through SoldierID 2024-11-14 00:43:48 +02:00
Asdow f5b1447646 Move MercSlots zeroing to same loop where MercPtrs are set
One less for loop that way
2024-11-13 22:12:37 +02:00
Asdow 4d740055da Provide access function to MenPtrs, MercPtrs & MercSlots
All raw array accesses should be done with these instead.
2024-11-13 01:33:32 +02:00
Asdow aad6ed8297 Implemented SoldierID type to replace SOLDIERTYPE->ubID
Goal is to convert all use of SOLDIERTYPE->ubID and any other ID fields that reference the same ID to a safer type than UINT16. Same with any function that's supposed to take ubID
2024-11-13 01:29:36 +02:00
Asdow d6370b7463 Fix invisible cows and bloodcats 2024-11-13 01:21:55 +02:00
Asdow 6c33009fab Remove bLastKnownEnemies from SECTORINFO
As per the old comment, even though the field value is updated partially according to whether there are known enemies present or not, it's not used for anything.
2024-11-11 00:14:51 +02:00
Asdow fcf2b27d1a More UINT8 -> UINT16 changes 2024-11-11 00:08:30 +02:00
Asdow 508310be3e Change UINT8 to UINT16 for soldierInitLists & hostiles in sector 2024-11-10 01:19:05 +02:00
Asdow 5cf0ef4bde Correct variables from INT8 to INT16 2024-11-09 22:52:21 +02:00
Asdow 2b024d63c6 Fix endless loop 2024-11-09 16:46:55 +02:00
Asdow a81820d0d7 Fix UB compilation 2024-11-09 16:46:39 +02:00
Asdow 17875978e0 Update LOS.cpp
Fix missing variable declaration
2024-11-09 15:24:30 +02:00
Asdow 4e253d0ec0 Update Dialogue Control.cpp
Fix an access to member variable that prevented compilation
2024-11-09 15:24:10 +02:00
Asdow 10250dc035 Merge branch 'master' into ExtraMercs 2024-11-09 13:44:53 +02:00
AsdowandGitHub 49a119e6b9 Convert INVTYPE boolean fields to flagmask (#325)
Rearranged fields from largest to smallest to remove alignment padding
2024-08-22 08:48:29 +03:00
AsdowandGitHub caa02cd6b7 Read new MercOpinions.xml format (#323)
Requires accompanying gameDir change.

MercOpinions.xml now only contains opinions that are not 0. A new tag with fields "id" and "modifier" are used instead of old ones that had 255 <Opinion%d> $value$ </Opinion%d> tags for all profiles.

Loading time of MercOpinions.xml went down from ~4.047 s to 0.011 s due to this change with default 1.13 VFS config.

A small cmd utility tool for converting existing MercOpinions.xml data into the new format is available at https://github.com/Asdow/JA2-ConvertXMLData/tree/master
2024-08-13 00:29:48 +03:00
AsdowandGitHub 3391c6d777 Ignore mercs away on minievents for food status updates (#322) 2024-08-11 13:30:49 +03:00
AsdowandGitHub 2307508a85 Use auto & to prevent an unnecessary copy (#321) 2024-08-10 21:56:35 +03:00
AsdowandGitHub a26845b608 Check that a dropped backpack belongs to a controllable merc (#320)
Fixes handle BP pickup behavior if a merc drops a backpack and then leaves the sector.
2024-08-10 20:14:15 +03:00
kitty624 b13bcaac71 Update Items.cpp
reworking r9343

- the part about Food System is obsolete, already was happening in code prior to r9343

- the flags got removed and a boolean is used instead, allowing a simpler function for the remaining disease

- wether an item is considered exclusive to disease feature or not is decided by usage of tag in items.xml
2024-04-15 01:33:47 +02:00
kitty624 e386a66f03 Update Item Types.h
reworking r9343

- no need for Foodsystem flag, restricting food items to food system was already part of the code prior to r9343 (in IsItemLegal by silversurfer)
- for disease system changed flag to boolean
2024-04-15 01:22:26 +02:00
kitty624 c03bd3ff3a Update ShopKeeper Interface.cpp
reworking r9343

- already decided in IsItemlegal
- if it ain't legal, it won't be shown in ShopKeeperInventory, no need to bother with it again
2024-04-15 01:17:18 +02:00
kitty624 72f01b5379 Fix Attachable Launchers Slot Tooltips
fix:
launchables made valid by attached launchers are now again  shown as tooltip and can be attached to slot with click

fixes

https://github.com/1dot13/source/issues/298
2024-04-10 09:22:01 +02:00
Marco Costaandmajcosta dee2415d4a simplify SOLDIERTYPE::GetDiseaseContactProtection( ) 2024-04-03 22:09:05 -03:00
Marco Costaandmajcosta 049ec47219 make OBJECTTYPE::Exists() const 2024-04-03 22:09:05 -03:00
Marco Costaandmajcosta d670383f3a add const accessor to Inventory 2024-04-03 22:09:05 -03:00
kitty624 682dbaa8fc Alternative IMP Background Selection
- two new options in ja2options.ini
 ALTERNATIVE IMP CREATION
- adds new additional backgrounds, exclusive to this option
- which IMP backgrounds will be available at selection is determined by previously made choices for skills, character traits and disablities
- if a tag in background is contradicting to content of skill/character/disability, it won't be shown at selection
- what's considered contradicting is based on what's been found in code for conntent of skill/character/disability
- i.e. HeatIntolerant adds a penalty for desert and tropical sectors, so don't show backgrounds that add bonus for those sectortypes instead
- a new tag <alt_impcreation, has been added to backgrounds for this as well
- if that tag is found, it will be considered as additional IMP background exclusive to the option

REDUCED IMP CREATION
- same as above, but this time only the new additional backgrounds will be avaialable at selection
- same rules for possible restrictions to be shown

ALTERNATIVE IMP CREATION is required for REDUCED IMP CREATION to work

For ja2options.ini, a new category, "Backgrounds" was created.
This will contain the two new options and the general option to enable backgrounds

Accompanying changes in gamedir:

INIEditorJA2Options.xml
ja2options.ini
backgrounds.xml
2024-03-19 19:37:16 +01:00
Andrzej Fałkowski e6c5f95d73 Fixed drugtypes and drugitems background tags causing subsequent tags in the same background to be skipped 2024-03-16 15:48:22 +01:00
AsdowandGitHub 9dfbc7d394 Use correct gridno for XY conversion (#289) 2024-03-13 19:29:28 +02:00
AsdowandGitHub 65698284c3 Re-enable extracover check for A* (#283)
Allows smarter pathfinding for AI, only done during turnbased pathing  to alleviate its extra cost
2024-02-11 14:57:53 +02:00
AsdowandGitHub ef69f9b2e6 Allow enemy to retreat (#279)
This check was preventing enemies from retreating into another sector if tactical AI retreat was enabled, leading into AI deadlock every time AI_ACTION_RUNAWAY was the decision.
2024-02-11 00:27:14 +02:00
AsdowandGitHub 28a4db0355 Guard against nullptr dereference (#278)
Encountered a situation where a pSoldier between bFirstID and bLastID was null and then we'd dereference it.
2024-02-10 17:18:19 +02:00