• R/O
  • SSH

zandronum-sandbox-stable: Commit


Commit MetaInfo

Revisionfc2233947af4768b8dec8e5d14e07a0e9bd356a5 (tree)
Time2022-01-24 07:29:50
AuthorEdoardo Prezioso <edward.san.dev@gmai...>
CommiterEdoardo Prezioso

Log Message

Fix a crash with the Hexen Firestorm weapon projectiles caused by a compiler misoptimization on Linux architecture.

Change Summary

Incremental Difference

diff -r 5423017dc820 -r fc2233947af4 src/g_hexen/a_clericflame.cpp
--- a/src/g_hexen/a_clericflame.cpp Sun Feb 13 15:45:26 2022 -0500
+++ b/src/g_hexen/a_clericflame.cpp Sun Jan 23 23:29:50 2022 +0100
@@ -120,8 +120,9 @@
120120
121121 DEFINE_ACTION_FUNCTION(AActor, A_CFlameMissile)
122122 {
123- int i;
124- int an, an90;
123+ // [EP] Fix misoptimization, not needed in recent GZDoom
124+ unsigned int i;
125+ unsigned int an;
125126 fixed_t dist;
126127 AActor *mo;
127128
@@ -141,7 +142,8 @@
141142 for (i = 0; i < 4; i++)
142143 {
143144 an = (i*ANG45)>>ANGLETOFINESHIFT;
144- an90 = (i*ANG45+ANG90)>>ANGLETOFINESHIFT;
145+ // [EP] Remove unused variable, will be removed also in GZDoom
146+ // an90 = (i*ANG45+ANG90)>>ANGLETOFINESHIFT;
145147 mo = Spawn ("CircleFlame", BlockingMobj->x+FixedMul(dist, finecosine[an]),
146148 BlockingMobj->y+FixedMul(dist, finesine[an]),
147149 BlockingMobj->z+5*FRACUNIT, ALLOW_REPLACE);
Show on old repository browser