Commit graph

135 commits

Author SHA1 Message Date
Sir-Skurpsalot
80eaaff7fa
Merge branch 'TorqueGameEngines:development' into Sir-Skurpsalot-player_fixes_&_tweaks 2026-05-02 19:14:04 -06:00
Sir-Skurpsalot
51686fa452
Update player.cpp 2026-04-15 17:20:49 -06:00
Sir-Skurpsalot
a49f9ff006
Update player.cpp 2026-04-15 17:11:20 -06:00
Sir-Skurpsalot
7e72dfba81
Update player.cpp
fixed validator stuff
2026-04-15 17:08:10 -06:00
Sir-Skurpsalot
b351b3ffbe
Update player.cpp 2026-04-15 14:31:27 -06:00
Sir-Skurpsalot
08bda4008b
Update player.cpp
1.added min and max prone look angle to datablock
2.added crawlsound, triggered like footsteps by animation trigger 3
3.added missing code for prone_side and prone_right animations
4.replaced box left/right/back/front head percentages with torso percentages, makes more sense for general use.
5.getDamageLocation() overhauled for better results in every pose
6.tweak to canSwim() to make sure player is actually submerged enough for the swim bounding box
7.fixed canCrouch(), canProne(), and canStand() calculations to work with lower boxSize.z values.
8.swapped order of canCrouch() and canProne() checks crouch so crouch does not need to be released in order to go prone  (allows for scripting momentary crouch but toggle prone type setup if desired)
9.Added an engineMethod to check canProne() from script
10.tweaked canSprint to not allow if mWaterCoverage > 0.5
2026-04-14 21:35:46 -06:00
AzaezelX
0fd3c6b013 Allow Player class derivatives to override NumTableActionAnims
the player class (and resource derivatives, contain a mix of hardcoded animation names, as well as scriptable ones that can be tripped via playthread/setActionThread.
to determine if an animation within the stored vector is hardcoded or a scripted oneoff for that mesh, theres a demarcation at NumTableActionAnims for the up to 512 animation slots available.
when deriving from player, we must therefore allow that entry to be overridden for any class which adds additional hardcoded animations
therefore this introduces a datablock-level entry for the marked slot.
2026-04-14 15:24:04 -05:00
AzaezelX
9ca436d193 quick fix for misc sounds
player and vehicle were not loading some of thier sounds.
we'll want to revisit this with a more comprehensive solution in the future, but this will at least allow folks to use the systems in place
2026-04-04 15:21:47 -05:00
AzaezelX
a074146603 Merge branch 'development' of https://github.com/TorqueGameEngines/Torque3D into alpha41/controllerCreaceCorrections 2026-03-17 15:46:45 -05:00
AzaezelX
ae67aaba4a controler hardening
work towards better handling of tightly overlapping corners and degenerate polysoup faces
2026-03-16 22:48:12 -05:00
ZombieSoul
014ab6991a Fix wrong variable in physics collision loop
In Player::updatePos(), when processing physics collision results, the code was incorrectly using col.object instead of colCheck.object when checking if the collision object is a player.

This caused:
- First iteration: col.object is uninitialized (zeroed), leading to null pointer access
- Subsequent iterations: col.object contains the previous iteration's value, causing incorrect type checks

The fix changes col.object to colCheck.object to properly check the current collision object.
2026-03-15 10:15:30 -04:00
AzaezelX
b8f7d186d3 default controlables and items to mPathfindingIgnore = true; 2026-01-14 09:21:57 -06:00
AzaezelX
5ffa3b81f1 dial back nullPtr usage
while it still remains a good idea to port as many NULL compares and assignments over to nullPtr as feasable, we do still need to sort out how to better support scripted empty, false, and zero assigns for things like objectIDs.

this means we'll need to both fully convert the backend of the parser to support that kind of thing, but also alter most if not all exisiting NULLs. up to and including things like SAFE_DELETE. while that's certainly feasable, given there's aproximatel 400 nullptr assigns/checks prior to this commit, and roughly 1800 of the prior, if it terminates in a script call and not an aip one direct, we'll be dialing that back until such time as fork fully fopcused on converting and resolving any lingering mismatches is completed.
2025-12-29 17:45:09 -06:00
AzaezelX
4c083d713d physics findings
rigid: main finding is rigid needs to take delta into account for integration (aka interpolation)
also used POINT_EPSILON for thresholds for consistency

for rigidshape/item/player, main finding was length calcs for the search area were all over the place,
so we now derive the extended length of the cached area based on the velocity and the object's radius itself rather than guessin per class

atrest gravity calc suplimental syncing between rigidshape and vehicle

**remindernote POINT_EPSILO is 0.0001
2025-12-13 17:41:21 -06:00
AzaezelX
b8e135759f player extendabilty flexpoints
set several variables and methods to prtected instead of private for ease of inheritance
2025-09-27 15:38:08 -05:00
AzaezelX
7f1b83f1c6 remove redundant reskin 2025-09-19 09:36:46 -05:00
AzaezelX
03c99f845b fix crash with unclean exit
for player, if we're unmounting because we're being deleted, don't bother animating
for tsthreads in general, not much point in removing the threadlist, then checking if it's scaled
2025-07-14 08:08:22 -05:00
Brian Roberts
5c9e34a90c
Merge pull request #1515 from Azaezel/alpha41/preLoad
try to load shapes during preload
2025-07-06 22:35:33 -05:00
AzaezelX
e8ccb3443a try to load shapes during preload
it's half the point of the protocol
2025-07-06 19:51:55 -05:00
AzaezelX
1b6a0a5f74 further filtering for updatePlayerAttachment
*just* check pathshape/staticshape/terrain for determining if we are attaching/detaching from a pathshape
and don't bother if we're not enabled and not falling
2025-07-05 18:01:01 -05:00
AzaezelX
0f2e4b80e6 add grace hieght for pathshape snapping eval
leverage minFaceDistance plus current hieght to try and ensure stepping down into a pathshape/tsstatic within the 0.1 ot -1.0 detection range range doesn't snap you through another one.
2025-07-03 16:57:00 -05:00
marauder2k7
5d641929cf player and ground cover 2025-06-19 14:10:00 +01:00
marauder2k7
ca1604170d initial commit
change the macro to use the refactor (exact same structure as the imageasset macro)
2025-06-19 13:34:07 +01:00
AzaezelX
618ddbc9ba Merge branch 'development' of https://github.com/TorqueGameEngines/Torque3D into aiSubsystem
# Conflicts:
#	Engine/source/T3D/player.cpp
2025-04-28 14:28:54 -05:00
Brian Roberts
2ac15f74f2
Merge pull request #1443 from Azaezel/alpha41/controlModel
add a controlmap entry
2025-04-28 10:50:02 -05:00
AzaezelX
2ae10c7ce1 add reload status to onNewDataBlock callback
and skip calling onremove/onadd if we're not reloading
2025-04-27 19:49:13 -05:00
AzaezelX
3210325f3f elevated mAicontroller to shapebase
aiwheeleedveiclecontrollerdata resolvespeed now only touches throttle
objects assigned aicontrollers now reflect that by thier objecttype
basic flocking
2025-04-19 04:25:36 -05:00
AzaezelX
d36cf31707 more safeties. simplified reverse steering calc 2025-04-18 18:27:39 -05:00
AzaezelX
712404c9b4 hook up Vehicle's getAIMove(Move*);
list aiControllerData's in the datablock. though the command is still required to set the controler and look up the relevant db for game specific logic
2025-04-18 12:28:49 -05:00
AzaezelX
2d0bcbcf8d behavioural change: feeding an AInfo an object with a 0 radius causes the class to fill in radius from that objects bounds box
also, vehicle direct hooks
2025-04-18 11:36:27 -05:00
AzaezelX
78a26b0108 expose a getThrottle for vehicles. save some calcs in AIWheeledVehicleControllerData
deletion cleanups
2025-04-18 11:00:13 -05:00
AzaezelX
4f87ad4cf7 moar gaol tracking cleanups 2025-04-17 12:27:05 -05:00
AzaezelX
4fb92f02a3 completed list of roughly ported over scripthooks.
todo: need to figure out why followobject is only hitting the first path node. likely  amixup with goal handling
2025-04-17 01:27:08 -05:00
AzaezelX
2fe36a571b setaicontroller: use Ids
get rid of duplicated mMoveDestination
2025-04-15 18:01:18 -05:00
AzaezelX
201b7bf695 aiController.setMoveDestination test 2025-04-15 17:00:36 -05:00
AzaezelX
8c663a19a5 generalized ai subsystem wipwork 2025-04-15 15:12:27 -05:00
AzaezelX
5b2c0c7703 add a controlmap entry
for players, vehicles, and turret datablocks
add a client command to setMovemap(%object.getDatablock().controlMap)
2025-04-13 14:51:30 -05:00
AzaezelX
2d974cebf5 add difFloatPi range validator
player:
apply to player min/max angle
allow fallingspeedthreshold to go negative
splashdata:
velocity, hieght, acceleration and startradius can all be negative
wrap material animation range from -1 to 1
2025-04-03 16:52:49 -05:00
AzaezelX
f633ef3a3d fill in the validated variables 2025-03-09 11:53:23 -05:00
JeffR
bf9f0ee6cd Adjusts the test behavior for when the player class tries to ray-check against PathShapes to nudge the player to a safer position. Originally it ONLY checked pathshapes, so a static over a pathshape could cause erroneous behavior. 2025-01-27 00:15:14 -06:00
AzaezelX
7b393b668b handle pathshapes comming in from above players more gracefully
if you're within a pathshape as it moves, put you on top
2025-01-15 20:35:02 -06:00
AzaezelX
b5e1b32064 roll back player animation picking
old one worked better even if it made the compiler scream
2024-07-26 10:25:02 -05:00
AzaezelX
7ac714606f proper formulation 2024-06-11 16:08:07 -05:00
AzaezelX
61978fa4da pickanimation filter fix, with docs
sorts the order of operations flaws clang was complaining about, with explainations on why
2024-06-11 15:21:24 -05:00
Areloch
af7b5cdb34 * Improved logic to better handle the callback kickoff for actionAnimations happening
* Also adds animation name to callback so you can work off which animation triggered it
2024-02-04 00:03:35 -06:00
AzaezelX
e5a7c73bbe remove arbitrary impact sound spam
1) don't call them when onimpact threshold isn't crossed.
2) *definitely* don't call them with an arbirtary /3 threshold
2024-01-21 13:05:37 -06:00
AzaezelX
aa02e48c8d add safeties for enum math across define boundaries 2023-04-26 22:27:35 -05:00
AzaezelX
1fb4f57f6e adress #96 2023-03-30 14:19:50 -05:00
AzaezelX
c4ae6258cc sound safeties and future notes 2023-02-26 17:26:43 -06:00
AzaezelX
15f7f04bee standardize soundasset preloading for datablocks 2023-02-19 05:19:51 -06:00