- fixed a few cheat issues.

Fixes #29.
This commit is contained in:
Christoph Oelckers 2020-07-26 17:04:02 +02:00
parent 5870d3d89d
commit f67d3270d8
2 changed files with 7 additions and 6 deletions

View File

@ -82,7 +82,7 @@ bool cheatInventory(cheatseq_t *s)
}
};
invGet(400, EVENT_CHEATGETSTEROIDS, ps[myconnectindex].steroids_amount);
invGet(400, EVENT_CHEATGETSTEROIDS, ps[myconnectindex].steroids_amount);
if (!isRR()) invGet(1200, EVENT_CHEATGETHEAT, ps[myconnectindex].heat_amount);
invGet(isRR() ? 2000 : 200, EVENT_CHEATGETBOOT, ps[myconnectindex].boot_amount);
invGet(100, EVENT_CHEATGETSHIELD, ps[myconnectindex].shield_amount);
@ -90,6 +90,7 @@ bool cheatInventory(cheatseq_t *s)
invGet(2400, EVENT_CHEATGETHOLODUKE, ps[myconnectindex].holoduke_amount);
invGet(isRR() ? 600 : 1600, EVENT_CHEATGETJETPACK, ps[myconnectindex].jetpack_amount);
invGet(max_player_health, EVENT_CHEATGETFIRSTAID, ps[myconnectindex].firstaid_amount);
if (ps[myconnectindex].inven_icon == ICON_NONE) C_DoCommand("invnext");
if (s) FTA(120,&ps[myconnectindex]);
return true;
}
@ -291,10 +292,9 @@ static bool cheatHyper(cheatseq_t *)
static bool cheatMonsters(cheatseq_t *)
{
if(actor_tog == 3) actor_tog = 0;
actor_tog++;
static const char *s [] = { "OPTVAL_ON", "OPTVAL_OFF", "$TXT_ON2" };
Printf(PRINT_NOTIFY, "%s: %s", GStrings("NETMNU_MONSTERS"), s[actor_tog]);
if(++actor_tog == 3) actor_tog = 0;
static const char *s [] = { "OPTVAL_ON", "OPTVAL_OFF", "TXT_ON2" };
Printf(PRINT_NOTIFY, "%s: %s", GStrings("NETMNU_MONSTERS"), GStrings(s[actor_tog]));
return true;
}

View File

@ -431,13 +431,14 @@ static FString statFPS()
double frameDelay = frameTime - lastFrameTime;
cumulativeFrameDelay += frameDelay;
frameCount++;
if (frameDelay >= 0)
{
output.AppendFormat("%5.1f fps (%.1f ms)\n", lastFPS, frameDelay);
if (cumulativeFrameDelay >= 1000.0)
{
lastFPS = 1000.f * frameCount / cumulativeFrameDelay;
lastFPS = 1000. * frameCount / cumulativeFrameDelay;
frameCount = 0;
cumulativeFrameDelay = 0.0;
}