mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-02-13 21:45:17 +03:00
Fix invuln cheat on Solar and terrain.
Some checks are pending
Some checks are pending
This commit is contained in:
parent
6a52c9a2ae
commit
fb130d48ba
@ -974,6 +974,10 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) {
|
||||
Vec3f sp38;
|
||||
f32 sp34 = 20.0f;
|
||||
|
||||
if (CVarGetInteger("gInvincible", 0)) {
|
||||
damage = 0;
|
||||
}
|
||||
|
||||
player->dmgType = damage;
|
||||
player->hitDirection = direction;
|
||||
|
||||
@ -6945,7 +6949,9 @@ void Play_UpdateLevel(void) {
|
||||
}
|
||||
|
||||
if ((gPlayer[0].state == PLAYERSTATE_ACTIVE) && ((gGameFrameCount & cycleMask) == 0)) {
|
||||
if (!CVarGetInteger("gInvincible", 0)) {
|
||||
gPlayer[0].shields--;
|
||||
}
|
||||
if (gPlayer[0].shields <= 0) {
|
||||
gPlayer[0].shields = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user