13 Commits

Author SHA1 Message Date
Jon Daniel
adda1c1f15 adaptive aligned std::array based vector types (#686) 2025-05-08 21:36:35 +02:00
Azamat H. Hackimov
c32c2d3db3 Convert physics to use new logging facility 2024-09-10 03:00:25 +03:00
Louis Gombert
9fcd4e7857 Merge pull request #558 from jengelh/crashes.2
Fix some 8 other game crashes [ASAN]
2024-09-07 21:57:49 +02:00
Jan Engelhardt
e90eb6de7d Resolve out-of-bounds access in CollideSubmodelFacesUnsorted
physics/newstyle_fi.cpp:166:50: runtime error: index -1 out of bounds for type "short int [35]"
2024-08-31 12:13:44 +02:00
Jan Engelhardt
9e03622b24 Resolve out-of-bounds in PolyCollideObject
(Observed in Retribution level 7 while interacting with an Old
Scratch robot.) Potentially might fix issue #530.

fvi_moveobj=-1
fvi_moveobj=101
fvi_moveobj=235
fvi_moveobj=374
fvi_moveobj=-378
fvi_moveobj=-378
fvi_moveobj=-374
==59260==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000003c8f058 at pc 0x0000012857fc bp 0x7ffffb094c50 sp 0x7ffffb094c48
READ of size 1 at 0x000003c8f058 thread T0
    f0  PolyCollideObject(object*) $GIT/physics/newstyle_fi.cpp:370
    f1  check_hit_obj(int) $GIT/physics/findintersection.cpp:3483
    f2  fvi_rooms_objs $GIT/physics/findintersection.cpp:4398
    f3  fvi_FindIntersection(fvi_query*, fvi_info*, bool) $GIT/physics/findintersection.cpp:2812
    f4 AquireElectricalTarget(object*) $GIT/Descent3/WeaponFire.cpp:1189
    f5 CreateAndFireWeapon(vector*, vector*, object*, int) $GIT/Descent3/WeaponFire.cpp:1326
    f6 FireWeaponFromObject(object*, int, int, bool, bool) $GIT/Descent3/WeaponFire.cpp:1887
    f7 WBFireBattery(object*, otype_wb_info*, int, int, float) $GIT/Descent3/robotfire.cpp:149
    f8 FireWeaponFromPlayer(object*, int, int, bool, float) $GIT/Descent3/WeaponFire.cpp:3004
    f9 DoFlyingControl(object*) $GIT/Descent3/object.cpp:2450
    f10 ObjDoFrame(object*) $GIT/Descent3/object.cpp:2668
    f11 ObjDoFrameAll() $GIT/Descent3/object.cpp:2988
    f12 GameFrame() $GIT/Descent3/GameLoop.cpp:2980
    f13 GameSequencer() $GIT/Descent3/gamesequence.cpp:1221
    f14 PlayGame() $GIT/Descent3/game.cpp:834
    f15 MainLoop() $GIT/Descent3/descent.cpp:555
    f16 Descent3() $GIT/Descent3/descent.cpp:508
    f17 oeD3LnxApp::run() $GIT/Descent3/sdlmain.cpp:151

0x000003c8f058 is located 52 bytes after global variable 'last_heartbeat' defined in '$GIT/Descent3/multi.cpp:9459:16' (0x3c8f020) of size 4
0x000003c8f058 is located 8 bytes before global variable 'guard variable for MultiSendHeartbeat()::last_heartbeat' defined in '$GIT/Descent3/multi.cpp:9459:16' (0x3c8f060) of size 8
2024-08-30 05:25:11 +02:00
Azamat H. Hackimov
b9da6b59ff Isolate physics module
Update physics module, minor cleanups, remove unused code.
2024-07-28 16:50:42 +03:00
GravisZro
9cf9781369 Properly format/use variadic macros 2024-05-24 20:57:17 -04:00
GravisZro
a3a3797067 Replace "uint" with "uint32_t" 2024-05-23 22:57:25 -04:00
C.W. Betts
c6da74b069 Mark functions and variables as static (#185)
* Begin by marking functions and variables as static when needed.

* More work.

* More work.

* More pokes.

* More work.

* More work.

* Initial work on the netgames.

* Revert changes to the license header on source files.

* clutter.cpp poke.

* One final poke.

* Move some declarations to headers:

Move paged_in_count and paged_in_num to gamesequence.h
Move DoneLightInstance and StartLightInstance to polymodel.h

* Look over the AI script/plug-ins.

* Going over the changes one last time.

* Fix rebase errors.

* More migration from bare statics to static inlines.
2024-05-07 23:35:28 +02:00
Edu Garcia
553f851714 remove unused code 2024-05-06 22:06:26 +01:00
Kevin Bentley
1f45163248 Updated source to reflect the license that this code is released under. 2024-04-20 09:57:49 -06:00
Kevin Bentley
c6640cc631 clang-format on everything. 2024-04-16 12:56:40 -06:00
Kevin Bentley
df209742fc Initial import 2024-04-15 21:43:29 -06:00