Fix small bugs
This commit is contained in:
parent
3342a30e1e
commit
79d3b92883
3 changed files with 16 additions and 6 deletions
10
game.h
10
game.h
|
@ -1256,8 +1256,18 @@ void LCR_gameDraw3DView(void)
|
||||||
|
|
||||||
if (LCR_game.ghost.active && LCR_game.state != LCR_GAME_STATE_RUN_STARTING)
|
if (LCR_game.ghost.active && LCR_game.state != LCR_GAME_STATE_RUN_STARTING)
|
||||||
{
|
{
|
||||||
|
LCR_GameUnit carTransform2[3];
|
||||||
|
|
||||||
LCR_rendererSetGhostVisibility(1);
|
LCR_rendererSetGhostVisibility(1);
|
||||||
|
|
||||||
|
LCR_gameGhostGetTransform(LCR_racing.tick + 1,carTransform2,
|
||||||
|
carTransform + 3);
|
||||||
LCR_gameGhostGetTransform(LCR_racing.tick,carTransform,carTransform + 3);
|
LCR_gameGhostGetTransform(LCR_racing.tick,carTransform,carTransform + 3);
|
||||||
|
|
||||||
|
for (int i = 0; i < 3; ++i)
|
||||||
|
carTransform[i] += ((carTransform2[i] - carTransform[i]) *
|
||||||
|
physicsInterpolationParam) / LCR_GAME_UNIT;
|
||||||
|
|
||||||
LCR_rendererSetGhostTransform(carTransform,carTransform + 3);
|
LCR_rendererSetGhostTransform(carTransform,carTransform + 3);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -14,6 +14,12 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
|
||||||
|
#define LCR_EFFECTIVE_RESOLUTION_X \
|
||||||
|
(LCR_SETTING_RESOLUTION_X / LCR_SETTING_RESOLUTION_SUBDIVIDE)
|
||||||
|
|
||||||
|
#define LCR_EFFECTIVE_RESOLUTION_Y \
|
||||||
|
(LCR_SETTING_RESOLUTION_Y / LCR_SETTING_RESOLUTION_SUBDIVIDE)
|
||||||
|
|
||||||
#ifdef LCR_MODULE_NAME
|
#ifdef LCR_MODULE_NAME
|
||||||
#undef LCR_MODULE_NAME
|
#undef LCR_MODULE_NAME
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -26,12 +26,6 @@
|
||||||
rasterized pixel.
|
rasterized pixel.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define LCR_EFFECTIVE_RESOLUTION_X \
|
|
||||||
(LCR_SETTING_RESOLUTION_X / LCR_SETTING_RESOLUTION_SUBDIVIDE)
|
|
||||||
|
|
||||||
#define LCR_EFFECTIVE_RESOLUTION_Y \
|
|
||||||
(LCR_SETTING_RESOLUTION_Y / LCR_SETTING_RESOLUTION_SUBDIVIDE)
|
|
||||||
|
|
||||||
#define S3L_RESOLUTION_X LCR_EFFECTIVE_RESOLUTION_X
|
#define S3L_RESOLUTION_X LCR_EFFECTIVE_RESOLUTION_X
|
||||||
#define S3L_RESOLUTION_Y LCR_EFFECTIVE_RESOLUTION_Y
|
#define S3L_RESOLUTION_Y LCR_EFFECTIVE_RESOLUTION_Y
|
||||||
#define S3L_PIXEL_FUNCTION _LCR_pixelFunc3D
|
#define S3L_PIXEL_FUNCTION _LCR_pixelFunc3D
|
||||||
|
|
Loading…
Reference in a new issue