diff options
author | nathansmithsmith <thenathansmithsmith@gmail.com> | 2023-12-18 13:56:39 -0700 |
---|---|---|
committer | nathansmithsmith <thenathansmithsmith@gmail.com> | 2023-12-18 13:56:39 -0700 |
commit | 59b7c312c61a8526859c725d4f9a7367cbc4751d (patch) | |
tree | c5011d5da404e1926b87e882bfe48b9b60d98c47 /src/gameScreen.c | |
parent | 2016fd3e8a39205843f770df7e80df27f720abad (diff) |
Funny funny speed mod thingy
Diffstat (limited to 'src/gameScreen.c')
-rw-r--r-- | src/gameScreen.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/gameScreen.c b/src/gameScreen.c index d35a05d..059eea6 100644 --- a/src/gameScreen.c +++ b/src/gameScreen.c @@ -91,9 +91,7 @@ void drawCrossHair(float size, float thick, Color color) { void drawGameScreenInfoText(Game * game, GameScreen * gameScreen) { Entity * player = getEntityFromWorld(game->world, 0); - - Vector3 position = player->position; - Vector3 velocity = player->velocity.velocity; + AntifaShip * data = (AntifaShip*)player->data; // Hello reader. I fucking hate you! size_t bufSize = 255; @@ -103,12 +101,13 @@ void drawGameScreenInfoText(Game * game, GameScreen * gameScreen) { snprintf( buf, bufSize, - "Health %.2f\n\nX %.2f\nY %.2f\nZ %.2f\n\nSpeed %.2f", + "Health %.2f\n\nX %.2f\nY %.2f\nZ %.2f\n\nSpeed %.2f/%.2f", player->health, - position.x, - position.y, - position.z, - Vector3Length(velocity) + player->position.x, + player->position.y, + player->position.z, + data->forwardSpeed, + Vector3Length(player->velocity.velocity) ); // Draw info text. @@ -240,7 +239,7 @@ void gameScreenHandleLevels(Game * game, GameScreen * gameScreen) { if (GetTime() - gameScreen->timeAtLevelComplete >= GAME_SCREEN_NEXT_LEVEL_DELAY) { gameScreen->levelComplete = false; startLevel(game, &game->levels, gameScreen->lastLevel + 1); - getEntityFromWorld(game->world, 0)->health = gameScreen->healthAtLevelEnd; + getEntityFromWorld(game->world, 0)->health = Clamp(gameScreen->healthAtLevelEnd * 1.5, 0.0, 1.0); } return; |