mirror of
https://git.code.sf.net/p/quake/prozac-qfcc
synced 2024-11-14 00:40:32 +00:00
fix some int / int problems caused by qfcc's integer support.
This commit is contained in:
parent
8e1eaf1e89
commit
6fda29570c
4 changed files with 8 additions and 8 deletions
4
ai.qh
4
ai.qh
|
@ -1,4 +1,4 @@
|
||||||
//CH How much to divide speed when tranqed
|
//CH How much to divide speed when tranqed
|
||||||
//distance * (UP / DN)
|
//distance * (UP / DN)
|
||||||
#define AI_TRANQ_FACTOR_UP 2
|
#define AI_TRANQ_FACTOR_UP 2.0
|
||||||
#define AI_TRANQ_FACTOR_DN 3
|
#define AI_TRANQ_FACTOR_DN 3.0
|
||||||
|
|
6
menu.qc
6
menu.qc
|
@ -1517,7 +1517,7 @@ void(float inp) Menu_EngineerFix_Dispenser_Input =
|
||||||
if (CheckEnemyDismantle()==FALSE) {ResetMenu(); self.impulse=0; return;}
|
if (CheckEnemyDismantle()==FALSE) {ResetMenu(); self.impulse=0; return;}
|
||||||
|
|
||||||
sprint (self, PRINT_HIGH, "You dismantle the Dispenser.\n");
|
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
|
#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
|
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");
|
sprint(self, PRINT_HIGH, "You dismantle the Sentry Gun.\n");
|
||||||
//CH give .5 of build cost====give 25*level
|
//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
|
#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
|
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");
|
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
|
//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;
|
self.building.real_owner.has_tesla = FALSE;
|
||||||
|
|
||||||
#ifdef QUAKE_WORLD
|
#ifdef QUAKE_WORLD
|
||||||
|
|
2
speed.qc
2
speed.qc
|
@ -132,7 +132,7 @@ else
|
||||||
if (check && (max == 0) && (dist > 100)) { //Definitely cheating...
|
if (check && (max == 0) && (dist > 100)) { //Definitely cheating...
|
||||||
self.owner.cheat_level = self.owner.cheat_level + 700;
|
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;
|
self.owner.cheat_level = self.owner.cheat_level + 200;
|
||||||
if (self.owner.cheat_level >= 900 && self.has_sentry == 0 && dist > max) {
|
if (self.owner.cheat_level >= 900 && self.has_sentry == 0 && dist > max) {
|
||||||
bprint(PRINT_HIGH, self.owner.netname);
|
bprint(PRINT_HIGH, self.owner.netname);
|
||||||
|
|
4
tfort.qc
4
tfort.qc
|
@ -3792,7 +3792,7 @@ void() TeamFortress_RegenerateCyber =
|
||||||
{
|
{
|
||||||
if (self.owner.ammo_medikit == 0)
|
if (self.owner.ammo_medikit == 0)
|
||||||
self.owner.health = self.owner.health + 1;
|
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.health = self.owner.health + self.owner.ammo_medikit * 2;
|
||||||
self.owner.ammo_medikit = 0;
|
self.owner.ammo_medikit = 0;
|
||||||
|
@ -3800,7 +3800,7 @@ void() TeamFortress_RegenerateCyber =
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
self.owner.health = self.owner.health + PC_MEDIC_REGEN_AMOUNT;
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue