502 Commits
Author SHA1 Message Date
Marco Costaandmajcosta dee2415d4a simplify SOLDIERTYPE::GetDiseaseContactProtection( ) 2024-04-03 22:09:05 -03:00
Marco Costaandmajcosta d670383f3a add const accessor to Inventory 2024-04-03 22:09:05 -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 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
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
Andrzej FałkowskiandGitHub 7edecd6849 Fixed vehicle body not properly removed when destroyed during ramming (#210) 2023-08-28 16:26:46 +03:00
rftrdevandGitHub aaeea9aac8 Replace evolution with growth rates (#201) 2023-08-09 18:36:44 -07: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
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
AsdowandGitHub 35109a5615 Guard against possible illegal array access (by Seven) (#121)
ClosestPanicTrigger() can return -1 but its use in indexing gTacticalStatus.bPanicTriggerIsAlarm was not checked in all the places in the code
2023-01-31 20:26:21 +02:00
rftrdevandGitHub b5ec955324 Disable backpack climb check for non-player soldiers (#117) 2023-01-27 17:56:46 -08:00
Marco Antonio Jaguaribe CostaandAsdow d4abc82488 Address review feedback 2023-01-19 00:13:08 +02:00
Marco Antonio Jaguaribe CostaandAsdow 8b1c4effa0 nuke all the #if 0's
scripted commit:

find . -not -path '*/.*' -and -not -path '*/ext*' -type d -exec coan source -R -E {} ';'

https://coan2.sourceforge.net/coan_man_1.html
2023-01-19 00:13:08 +02:00
majcostaandGitHub 6afe785f4b Default to not displaying the fake light around mercs (#86)
* Remove option to disable 'Mercs Lights during Movement"

This might've cost someone some frames in 1999, but today even a 10
year old smartphone can probably run with this turned on at 1080p without
dropping a sweat

This does not remove the menu option which I plan to replace with
'Highlight Mercs' which was hidden for some reason.

'Merc Lights during Movement' is a noop now tho

* Replace 'Merc Lights during movement' with 'Highlight Mercs'

as title

* Make 'Merc Highlights' default to false

"Wtf why am I glowing?" well your problems are over
2023-01-18 20:56:34 +02:00
CptMooreandGitHub 624c0f3bc4 Flashlight changes (#81)
* Flashlight changes:
- Fixed the lighted area being way too large in the diagonal directions.
- Added a minimum range to simulate a flashlight user not illuminating its feet.
- Added angle based calculations instead of the hardcoded one.

* Flashlight changes, MR feedback.
2023-01-18 20:52:12 +02:00
majcostaandGitHub 24425a82b1 More unused stuff removal (#49)
* More unused stuff removal

delete:
- giant 'metaheaders' (JA2 All.h, Laptop All.h, etc), preferring to add #includes directly where needed
- unused ExceptionHandling and DbMan translation units
- unused WizShare.h, Bitmap.h, trle.h, video_private.h headers

* remove mentions from vc proj files too

* remove preprocessor conditionals for unused definitions

find . -iname '*.h' -o -iname '*.cpp' -exec unifdef.exe -m -UPRECOMPILED_HEADERS -UJA2_PRECOMPILED_HEADERS -UWIZ8_PRECOMPILED_HEADERS -UPRECOMPILEDHEADERS {} ';'

then manually fixed a couple files the tool errored out on

* yes, the comments too

as title
2023-01-03 15:51:48 +02:00
rftrdev 7c6f7d6d09 Revert "Undo unrelated Chinese text changes"
This reverts commit 75332ea219.
2022-11-04 22:42:09 -07:00
rftrdev 75332ea219 Undo unrelated Chinese text changes 2022-11-04 22:39:33 -07:00
rftrdevandGitHub 0aa1561ef8 Merge branch '1dot13:master' into arc-missions 2022-11-04 21:55:33 -07:00
Asdow 95e9d83165 r9404: Prevent illegal array access
Using kill all enemies cheat via ALT + o caused reading MercPtrs from index 254 when its last element is at 253
2022-11-04 20:26:01 +02:00
rftrdev feaf9827c9 Set up ASSIGNMENT_REBELCOMMAND
Hook up Start Mission button
2022-10-13 11:31:48 -07:00
Sevenfm 0f4aea2574 Experimental fix: use WALKING movement mode when sidestepping with weapon raised in turnbased mode.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9381 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-05-07 18:37:27 +00:00
rftr 7b57f834f6 unactivated turncoats ignore suspicious activity.
unactivated turncoats intentionally try to miss when shooting at mercs/militia.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9370 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-04-24 21:16:13 +00:00
Sevenfm 904fae7a96 CancelDrag, StartDrag: update interface panel to change drag icon status.
DrawTraitRadius uses usColour.
Allow to start dragging from any stance, soldier will crouch automatically.
Show draggable objects when drag skill menu is active.
Press [\] key to start dragging object/solder/corpse in front of merc.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9369 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-04-24 18:21:44 +00:00
Sevenfm cdc605d5ab Press [\] to break window glass with crowbar or any two-handed weapon. Weapon can be damaged in the process.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9368 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-04-21 13:00:09 +00:00
rftr fcc21e32dc added new option in Skills_Settings.ini: [Covert Ops] COVERT_TURNCOATS_ACTIVATE_IN_AUTORESOLVE
if enabled, turncoats will automatically activate when entering an autoresolve battle

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9365 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-04-14 06:50:44 +00:00
rftr 75d98aecfd add "Disguise" menu to tactical skill menu (alt + rightclick)
add "Fill canteens" action to tactical skill menu, under "various" 

adapted from Seven's +AI

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9350 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-03-29 06:02:44 +00:00
Sevenfm 9acaa41e95 Added Autobandage option to Skill Menu.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9344 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-03-25 10:50:18 +00:00
rftr 87b0c7c6b7 new feature: madlab's robot can be upgraded
requires gamedir r2642

https://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=364403

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9338 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-03-21 17:34:49 +00:00
Shadooow a184f76753 Fix for grenades being put into inventory instead back into hand if the soldier is stopped from throwing it in middle of animation by game (interrupt/spotting another enemy).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9311 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-02-28 22:23:33 +00:00
Sevenfm 49989da8b1 Dropping items from hand when being hit:
- civilians with profile should not drop items from hand as it may break quests
- fixed possible incorrect type conversion which could result in dropping too often if weapon in hand marked as undroppable

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9280 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-01-27 01:24:11 +00:00
Shadooow 1749d3adfb Surrender GUI when talking to boxing opponent replaced with MessageBox allowing to forfeit the match.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9226 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-01-01 13:33:34 +00:00
Shadooow f0f558f872 fixed collapsed soldiers sometimes not being able to get up when they should have until next player round
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9200 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-10-28 09:36:58 +00:00
Sevenfm c577894d3f Allow scuba bottle to work from backpack slot for mod compatibility.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9191 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-10-19 08:25:27 +00:00
Sevenfm 6d14282538 NEW_SUPPRESSION_CODE:
- use effective experience level when calculating base suppression tolerance, so nearby squad leaders may raise effective level and help fight suppression
- if NEARBY_FRIENDLIES_AFFECT_TOLERANCE option is active, nearby friends can help increase suppression tolerance, up to +-3 points added depending on distance, only for merc bodytypes

CheckStatusNearbyFriendlies: minor code improvements, fixed variable names, use INT16 for calculation

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9182 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-10-15 08:44:57 +00:00
Sevenfm 7978ad77f3 Morale changes for AI soldiers:
- GetMoraleModifier: use bMorale for both player and AI.
- CalcSuppressionTolerance: use morale as a base for tolerance for AI soldiers.
- HandleSuppressionFire: morale loss for AI soldiers.
- EVENT_BeginMercTurn: increase morale for AI soldiers.
- TacticalCreateSoldier: Set morale = 60 + 2 * bExpLevel + Random(20) when creating AI soldier.

NEW_SUPPRESSION_CODE: UseGun, UseGunNCTH: reduce shock when firing gun.
AI_NEW_MORALE: limit AI morale depending on morale and shock level.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9181 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-10-15 05:52:09 +00:00
Flugente eca080f0f9 New feature (by rftr): Arulco Rebel Command (ARC)
Improve you cities and overall campaign by choosing out of several upgrades

Requires GameDir >= r2613

For more info, see https://thepit.ja-galaxy-forum.com/index.php?t=msg&th=24884&start=0&

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9153 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-08-22 19:00:09 +00:00
Flugente e6ea95eb8b Whether a gun shoots fire or fire retardant is now set on the ammo with the <ammoflag>-tag, not the gun.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9144 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-07-15 18:22:53 +00:00
Flugente 960bb2d4ba New feature (by rftr): Mini events are a feature where the player can receive short text blurbs, and pick one of two outcomes.
Based on game implementations like Gloomhaven (road/city events) or Battletech (travel events).

For more info, see https://thepit.ja-galaxy-forum.com/index.php?t=msg&th=24865&goto=363481&#msg_363481

Requires GameDir >= r2599

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9137 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-07-09 19:38:55 +00:00
Flugente 8d112e5191 Added lua function for finding/creating/destroying items in a soldier's inventory
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9132 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-07-08 19:23:26 +00:00
Shadooow d6f07a7ef5 godmode reworked: reused existing mechanism in code = same functionality, less code changes, also when enabled GOD MODE text will now show up in left corner in red color, this was already there I just uncommented it
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9128 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-07-06 19:06:23 +00:00
Flugente 461f16eacb Added several interactive actions that play a sound when clicking on a structure
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9125 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-07-04 15:59:58 +00:00
Flugente 6f24fb89fd Fix: dragging a structure repaired it and removed all decals
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9120 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-06-28 14:52:12 +00:00
Shadooow 0dc07614a4 more god mod tweaks:
- prevented morale drop from getting damaged
- fixed sometimes taking damage in autoresolve

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9106 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-06-25 21:21:28 +00:00
Shadooow 50d9737528 god mode cheat: no special death animations against player either
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9099 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-06-22 11:56:12 +00:00
Shadooow da940db97c god mode cheat code tweaks + preventing ability damage
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9098 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-06-22 00:20:12 +00:00
Shadooow bdbe1ffe65 new cheat command CTRL+SHIFT+g = god mode (invulnerability) requested by Parkan, works in both tactical and strategic
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9097 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-06-21 21:15:17 +00:00
Shadooow eb1ee4a71a further lowered the damage of Joe punching mercs in interrogation cutscene to prevent him knocking the merc unconcious which resulted to endless clock issue
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9078 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-06-13 03:20:07 +00:00
Shadooow a854f73ba9 added missing code from commit 9059
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9073 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-06-12 09:43:43 +00:00