fix some int / int problems caused by qfcc's integer support.

This commit is contained in:
Bill Currie 2001-07-24 04:37:00 +00:00
parent 8e1eaf1e89
commit 6fda29570c
4 changed files with 8 additions and 8 deletions

4
ai.qh
View file

@ -1,4 +1,4 @@
//CH How much to divide speed when tranqed
//distance * (UP / DN)
#define AI_TRANQ_FACTOR_UP 2
#define AI_TRANQ_FACTOR_DN 3
#define AI_TRANQ_FACTOR_UP 2.0
#define AI_TRANQ_FACTOR_DN 3.0

View file

@ -1517,7 +1517,7 @@ void(float inp) Menu_EngineerFix_Dispenser_Input =
if (CheckEnemyDismantle()==FALSE) {ResetMenu(); self.impulse=0; return;}
sprint (self, PRINT_HIGH, "You dismantle the Dispenser.\n");
self.ammo_cells = self.ammo_cells + (BUILD_COST_DISPENSER / 2);
self.ammo_cells = self.ammo_cells + (BUILD_COST_DISPENSER / 2.0);
///////////////////////////
#ifdef QUAKE_WORLD
if (Teammate(self.building.real_owner.team_no,self.team_no) && teamplay != 0 && self.building.real_owner != self) { //Boot em if they dismantle too many
@ -1664,7 +1664,7 @@ void(float inp) Menu_EngineerFix_SentryGun_Input =
sprint(self, PRINT_HIGH, "You dismantle the Sentry Gun.\n");
//CH give .5 of build cost====give 25*level
self.ammo_cells = self.ammo_cells + (BUILD_COST_SENTRYGUN / 2) + (self.building.weapon * 25);
self.ammo_cells = self.ammo_cells + (BUILD_COST_SENTRYGUN / 2.0) + (self.building.weapon * 25);
#ifdef QUAKE_WORLD
if (Teammate(self.building.real_owner.team_no,self.team_no) && teamplay != 0 && self.building.real_owner != self) { //Boot em if they dismantle too many
@ -2239,7 +2239,7 @@ void() Menu_EngineerDismantle_Tesla =
sprint(self, PRINT_HIGH, "You dismantle the Tesla Gun.\n");
//CH give .5 of ammount of build====give 25*health level (0-3)====give .5 of cells
self.ammo_cells = self.ammo_cells + (BUILD_COST_TESLA / 2) + (self.building.ammo_rockets * 25) + (self.building.ammo_cells / 2);
self.ammo_cells = self.ammo_cells + (BUILD_COST_TESLA / 2.0) + (self.building.ammo_rockets * 25) + (self.building.ammo_cells / 2);
self.building.real_owner.has_tesla = FALSE;
#ifdef QUAKE_WORLD

View file

@ -132,7 +132,7 @@ else
if (check && (max == 0) && (dist > 100)) { //Definitely cheating...
self.owner.cheat_level = self.owner.cheat_level + 700;
}
if (check && (dist > (max * (1 + (MAXPERCENT / 100))))) // Maybe cheating.
if (check && (dist > (max * (1 + (MAXPERCENT / 100.0))))) // Maybe cheating.
self.owner.cheat_level = self.owner.cheat_level + 200;
if (self.owner.cheat_level >= 900 && self.has_sentry == 0 && dist > max) {
bprint(PRINT_HIGH, self.owner.netname);

View file

@ -3792,7 +3792,7 @@ void() TeamFortress_RegenerateCyber =
{
if (self.owner.ammo_medikit == 0)
self.owner.health = self.owner.health + 1;
else if (self.owner.ammo_medikit < PC_MEDIC_REGEN_AMOUNT / 2)
else if (self.owner.ammo_medikit < PC_MEDIC_REGEN_AMOUNT / 2.0)
{
self.owner.health = self.owner.health + self.owner.ammo_medikit * 2;
self.owner.ammo_medikit = 0;
@ -3800,7 +3800,7 @@ void() TeamFortress_RegenerateCyber =
else
{
self.owner.health = self.owner.health + PC_MEDIC_REGEN_AMOUNT;
self.owner.ammo_medikit = self.owner.ammo_medikit - PC_MEDIC_REGEN_AMOUNT / 2;
self.owner.ammo_medikit = self.owner.ammo_medikit - PC_MEDIC_REGEN_AMOUNT / 2.0;
}
}