From 4577d2b7d194f707283a9adde614c2bfb41d7bd1 Mon Sep 17 00:00:00 2001 From: TimePath Date: Sat, 25 Apr 2015 16:00:13 +1000 Subject: [PATCH] Declare more ints as ints --- qcsrc/client/waypointsprites.qh | 2 +- qcsrc/server/defs.qh | 2 +- qcsrc/server/mutators/base.qc | 4 ++-- qcsrc/server/mutators/mutator_nix.qc | 2 +- qcsrc/server/mutators/mutator_overkill.qc | 2 +- qcsrc/server/pathlib/expandnode.qc | 8 ++++---- qcsrc/server/vehicles/vehicles.qc | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/qcsrc/client/waypointsprites.qh b/qcsrc/client/waypointsprites.qh index 3822793da..2a2b4cb86 100644 --- a/qcsrc/client/waypointsprites.qh +++ b/qcsrc/client/waypointsprites.qh @@ -31,7 +31,7 @@ float waypointsprite_alpha; .string netname; // primary picture .string netname2; // secondary picture .string netname3; // tertiary picture -.float team; // team that gets netname2 +.int team; // team that gets netname2 .float lifetime; .float fadetime; .float maxdistance; diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index 54d1ed041..eeb6e44b9 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -250,7 +250,7 @@ float nJoinAllowed(entity ignore); .entity flagcarried; -.float playerid; +.int playerid; float playerid_last; .float noalign; // if set to 1, the item or spawnpoint won't be dropped to the floor diff --git a/qcsrc/server/mutators/base.qc b/qcsrc/server/mutators/base.qc index e13919a23..71bcd9e58 100644 --- a/qcsrc/server/mutators/base.qc +++ b/qcsrc/server/mutators/base.qc @@ -95,7 +95,7 @@ const float MAX_MUTATORS = 15; string loaded_mutators[MAX_MUTATORS]; float Mutator_Add(mutatorfunc_t func, string name) { - float i, j; + int i, j; j = -1; for(i = 0; i < MAX_MUTATORS; ++i) { @@ -128,7 +128,7 @@ float Mutator_Add(mutatorfunc_t func, string name) } void Mutator_Remove(float(float) func, string name) { - float i; + int i; for(i = 0; i < MAX_MUTATORS; ++i) if(name == loaded_mutators[i]) break; diff --git a/qcsrc/server/mutators/mutator_nix.qc b/qcsrc/server/mutators/mutator_nix.qc index a0ec6adaa..ec5574527 100644 --- a/qcsrc/server/mutators/mutator_nix.qc +++ b/qcsrc/server/mutators/mutator_nix.qc @@ -1,6 +1,6 @@ float g_nix_with_blaster; // WEAPONTODO -float nix_weapon; +int nix_weapon; float nix_nextchange; float nix_nextweapon; .float nix_lastchange_id; diff --git a/qcsrc/server/mutators/mutator_overkill.qc b/qcsrc/server/mutators/mutator_overkill.qc index 78a615106..a0198077d 100644 --- a/qcsrc/server/mutators/mutator_overkill.qc +++ b/qcsrc/server/mutators/mutator_overkill.qc @@ -1,4 +1,4 @@ -void ok_DecreaseCharge(entity ent, float wep) +void ok_DecreaseCharge(entity ent, int wep) { if(!ent.ok_use_ammocharge) return; diff --git a/qcsrc/server/pathlib/expandnode.qc b/qcsrc/server/pathlib/expandnode.qc index 4427f9b7f..47f160244 100644 --- a/qcsrc/server/pathlib/expandnode.qc +++ b/qcsrc/server/pathlib/expandnode.qc @@ -5,7 +5,7 @@ float plib_fvals[8]; float pathlib_expandnode_starf(entity node, vector start, vector goal) { vector where,f,r,t; - float i,fc,fc2,c; + float fc,fc2,c; entity nap; where = node.origin; @@ -37,7 +37,7 @@ float pathlib_expandnode_starf(entity node, vector start, vector goal) // Back-left plib_points[7] = where - f - r; - for(i=0;i < 8; ++i) + for(int i=0;i < 8; ++i) { t = plib_points[i]; fc = pathlib_heuristic(t,goal) + pathlib_cost(node, t, pathlib_gridsize); @@ -50,7 +50,7 @@ float pathlib_expandnode_starf(entity node, vector start, vector goal) vector bp; bp = plib_points[0]; fc2 = 0; - for(i = 0; i < 8; ++i) + for(int i = 0; i < 8; ++i) { c = 0; nap = pathlib_nodeatpoint(plib_points[i]); @@ -80,7 +80,7 @@ float pathlib_expandnode_starf(entity node, vector start, vector goal) pathlib_makenode(node, start, bp, goal, pathlib_gridsize); - for(i = 0; i < 3; ++i) + for(int i = 0; i < 3; ++i) { pathlib_makenode(node, start, plib_points2[i], goal, pathlib_gridsize); } diff --git a/qcsrc/server/vehicles/vehicles.qc b/qcsrc/server/vehicles/vehicles.qc index e29c23519..09beb16cc 100644 --- a/qcsrc/server/vehicles/vehicles.qc +++ b/qcsrc/server/vehicles/vehicles.qc @@ -44,7 +44,7 @@ float SendAuxiliaryXhair(entity to, int sf) return true; } -void UpdateAuxiliaryXhair(entity own, vector loc, vector clr, float axh_id) +void UpdateAuxiliaryXhair(entity own, vector loc, vector clr, int axh_id) { if (!IS_REAL_CLIENT(own)) return; -- 2.39.2