This is a fork of Zandronum for TSPG.
Revisão | 3dc3179a77a509741a8c85ed52cc0b01982c6ff1 (tree) |
---|---|
Hora | 2017-03-26 00:21:33 |
Autor | Benjamin Berkels <torr.samaho@quan...> |
Commiter | Benjamin Berkels |
Fixed: Angle arguments in DECORATE didn't work properly on ARM devices like the Raspberry Pi (adapted from the corresponding ZDoom fix, fixes 2773).
@@ -117,6 +117,7 @@ | ||
117 | 117 | - - Fixed a potential client crash related to the firing sound of a railgun. [Torr Samaho] |
118 | 118 | - - Fixed: Blood splatter caused unnecessary network traffic. [Torr Samaho] |
119 | 119 | - - Fixed: A_FiredSpawnRock and A_FiredSplotch caused unnecessary network traffic. [Torr Samaho] |
120 | +- - Fixed: Angle arguments in DECORATE didn't work properly on ARM devices like the Raspberry Pi (adapted from the corresponding ZDoom fix). [Torr Samaho] | |
120 | 121 | ! - Changed: Spectators can now interact with gravity and use the fly/land commands. [Leonard] |
121 | 122 | ! - Save games now contain information about the renderer used to create the save. This allows to print a proper error message when an incompatible save is tried to be loaded. [Torr Samaho] |
122 | 123 | ! - Clients don't error out anymore when encountering a division by zero in a DECORATE expression. Instead, a one time warning is printed on the first occasion and the result is assumed to be zero. This is necessary since clients can encounter this in valid DECORATE code due to Zandronum's jump handling. [Torr Samaho] |
@@ -141,4 +141,12 @@ | ||
141 | 141 | #define FIXED2FLOAT(f) ((f) / float(65536)) |
142 | 142 | #define FIXED2DBL(f) ((f) / double(65536)) |
143 | 143 | |
144 | +#define ANGLE2DBL(f) ((f) * (90./ANGLE_90)) | |
145 | +#define ANGLE2FLOAT(f) (float((f) * (90./ANGLE_90))) | |
146 | +#define FLOAT2ANGLE(f) ((angle_t)xs_CRoundToInt((f) * (ANGLE_90/90.))) | |
147 | + | |
148 | +#define ANGLE2RAD(f) ((f) * (M_PI/ANGLE_180)) | |
149 | +#define ANGLE2RADF(f) ((f) * float(M_PI/ANGLE_180)) | |
150 | +#define RAD2ANGLE(f) ((angle_t)xs_CRoundToInt((f) * (ANGLE_180/M_PI))) | |
151 | + | |
144 | 152 | #endif |
@@ -430,7 +430,7 @@ | ||
430 | 430 | #define ACTION_PARAM_NAME(var,i) \ |
431 | 431 | FName var = EvalExpressionName(ParameterIndex+i, self); |
432 | 432 | #define ACTION_PARAM_ANGLE(var,i) \ |
433 | - angle_t var = angle_t(EvalExpressionF(ParameterIndex+i, self)*ANGLE_90/90.f); | |
433 | + angle_t var = FLOAT2ANGLE(EvalExpressionF(ParameterIndex+i, self)); | |
434 | 434 | |
435 | 435 | #define ACTION_SET_RESULT(v) if (statecall != NULL) statecall->Result = v; |
436 | 436 |