silence implicit float->int conversion warnings

This commit is contained in:
emmie 2023-09-11 03:20:07 +00:00 committed by Kiri
parent 829c9c1242
commit 333c40e46a
2 changed files with 8 additions and 7 deletions

View File

@ -284,8 +284,8 @@ class KiriCacodemonPlushie : HDWeapon {
A_StartSound("potion/chug");
invoker.owner.A_TakeInventory("SecondBlood", 1, TIF_NOTAKEINFINITE);
invoker.setMonsterHealth(
invoker.getMonsterHealth() +
invoker.getMonsterMaxHealth() * 0.25);
int(invoker.getMonsterHealth() +
invoker.getMonsterMaxHealth() * 0.25));
// Throw out a spend blood bag.
A_SpawnItemEx(
@ -303,13 +303,14 @@ class KiriCacodemonPlushie : HDWeapon {
HDBleedingWound hbl = HDBleedingWound.inflict(
invoker.owner, 2, 1, source : invoker.owner);
HDPlayerPawn(invoker.owner).bloodloss += 0.1;
// FIXME this gets rounded down to 0
//HDPlayerPawn(invoker.owner).bloodloss += 0.1;
A_StartSound(invoker.owner.painsound);
invoker.setMonsterHealth(
invoker.getMonsterHealth() +
invoker.getMonsterMaxHealth() * 0.1);
int(invoker.getMonsterHealth() +
invoker.getMonsterMaxHealth() * 0.1));
}
}

View File

@ -248,8 +248,8 @@ class SnekTechSprayer : HDWeapon
}
int time = level.TotalTime;
int lastChargedTime = round(
float(pressure - KIRI_SPRAY_MAXPRESSURE) / float(KIRI_SPRAY_PRESSURE_DECAY_RATE) + time);
int lastChargedTime = int(round(
float(pressure - KIRI_SPRAY_MAXPRESSURE) / float(KIRI_SPRAY_PRESSURE_DECAY_RATE) + time));
weaponstatus[KIRI_SPRAY_WS_PRESSURE] = lastChargedTime;
}