]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Mario/ctf_updates
authorMario <zacjardine@y7mail.com>
Sun, 3 May 2015 14:43:37 +0000 (00:43 +1000)
committerMario <zacjardine@y7mail.com>
Sun, 3 May 2015 14:43:37 +0000 (00:43 +1000)
Conflicts:
qcsrc/client/hud.qc
qcsrc/server/autocvars.qh

93 files changed:
defaultXonotic.cfg
models/turrets/terrainbase.md3 [deleted file]
qcsrc/client/hud.qc
qcsrc/client/tturrets.qc
qcsrc/common/monsters/monster/shambler.qc
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/monsters/sv_monsters.qh
qcsrc/common/nades.qh
qcsrc/common/notifications.qc
qcsrc/common/util-pre.qh
qcsrc/common/util.qc
qcsrc/common/util.qh
qcsrc/common/weapons/w_arc.qc
qcsrc/common/weapons/w_blaster.qc
qcsrc/common/weapons/w_crylink.qc
qcsrc/common/weapons/w_devastator.qc
qcsrc/common/weapons/w_electro.qc
qcsrc/common/weapons/w_fireball.qc
qcsrc/common/weapons/w_hagar.qc
qcsrc/common/weapons/w_hlac.qc
qcsrc/common/weapons/w_hmg.qc
qcsrc/common/weapons/w_hook.qc
qcsrc/common/weapons/w_machinegun.qc
qcsrc/common/weapons/w_minelayer.qc
qcsrc/common/weapons/w_mortar.qc
qcsrc/common/weapons/w_porto.qc
qcsrc/common/weapons/w_rifle.qc
qcsrc/common/weapons/w_rpc.qc
qcsrc/common/weapons/w_seeker.qc
qcsrc/common/weapons/w_shockwave.qc
qcsrc/common/weapons/w_tuba.qc
qcsrc/common/weapons/w_vortex.qc
qcsrc/common/weapons/weapons.qc
qcsrc/common/weapons/weapons.qh
qcsrc/csqcmodellib/cl_model.qc
qcsrc/csqcmodellib/cl_model.qh
qcsrc/csqcmodellib/sv_model.qc
qcsrc/menu/item/listbox.qc
qcsrc/menu/item/textslider.qc
qcsrc/menu/menu.qc
qcsrc/menu/xonotic/campaign.qc
qcsrc/menu/xonotic/dialog_multiplayer_create.qc
qcsrc/menu/xonotic/dialog_multiplayer_create_mapinfo.qc
qcsrc/menu/xonotic/keybinder.qc
qcsrc/menu/xonotic/serverlist.qc
qcsrc/menu/xonotic/weaponslist.qc
qcsrc/server/autocvars.qh
qcsrc/server/cl_client.qc
qcsrc/server/cl_player.qc
qcsrc/server/cl_player.qh
qcsrc/server/defs.qh
qcsrc/server/g_casings.qc
qcsrc/server/g_damage.qc
qcsrc/server/g_damage.qh
qcsrc/server/g_hook.qc
qcsrc/server/g_models.qc
qcsrc/server/g_triggers.qc
qcsrc/server/g_triggers.qh
qcsrc/server/g_violence.qc
qcsrc/server/g_violence.qh
qcsrc/server/g_world.qc
qcsrc/server/mapvoting.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/gamemode_keyhunt.qc
qcsrc/server/mutators/gamemode_onslaught.qc
qcsrc/server/mutators/mutator_dodging.qc
qcsrc/server/mutators/mutator_nades.qc
qcsrc/server/mutators/mutator_physical_items.qc
qcsrc/server/portals.qc
qcsrc/server/scores.qc
qcsrc/server/spawnpoints.qc
qcsrc/server/spawnpoints.qh
qcsrc/server/t_items.qc
qcsrc/server/t_items.qh
qcsrc/server/t_plats.qc
qcsrc/server/target_music.qc
qcsrc/server/tturrets/include/turrets_early.qh
qcsrc/server/tturrets/system/system_damage.qc
qcsrc/server/tturrets/system/system_main.qc
qcsrc/server/tturrets/system/system_misc.qc
qcsrc/server/tturrets/units/unit_walker.qc
qcsrc/server/vehicles/bumblebee.qc
qcsrc/server/vehicles/bumblebee.qh
qcsrc/server/vehicles/racer.qc
qcsrc/server/vehicles/raptor.qc
qcsrc/server/vehicles/vehicles.qc
qcsrc/server/weapons/common.qc
qcsrc/server/weapons/common.qh
qcsrc/server/weapons/csqcprojectile.qc
qcsrc/server/weapons/tracing.qc
qcsrc/server/weapons/tracing.qh
qcsrc/warpzonelib/server.qc
xonotic-credits.txt

index 4f02d145e0276f7d66ae0a9036c3b9d9d6191cd2..783d4d624592dbbf19924ef8cd3f8af960825165 100644 (file)
@@ -472,7 +472,7 @@ set g_botclip_collisions 1 "0 = disable collision testing against botclips, migh
 set g_grappling_hook 0 "let players spawn with the grappling hook which allows them to pull themselves up"
 
 set g_spawn_alloweffects 1 "allow clients to enable spawn point and event effects such as particles and sounds, see cl_spawn_ cvars for more info"
-set g_spawn_furthest 1.0 "this amount of the spawns shall be far away from any players"
+set g_spawn_furthest 0.5 "this amount of the spawns shall be far away from any players"
 set g_spawn_useallspawns 0 "use all spawns, e.g. also team spawns in non-teamplay, and all spawns, even enemy spawns, in teamplay"
 // respawn delay
 set g_respawn_delay_small 2 "small game number of seconds you have to wait before you can respawn again"
diff --git a/models/turrets/terrainbase.md3 b/models/turrets/terrainbase.md3
deleted file mode 100644 (file)
index ee67dc5..0000000
Binary files a/models/turrets/terrainbase.md3 and /dev/null differ
index 20eef91237e6f916d212b8257780ac7c25a94b54..15cc1176087b2485502ff45924ea2dab166822bb 100644 (file)
@@ -141,13 +141,13 @@ vector HUD_Get_Num_Color (float x, float maxvalue)
        return color;
 }
 
-float HUD_GetRowCount(float item_count, vector size, float item_aspect)
+float HUD_GetRowCount(int item_count, vector size, float item_aspect)
 {
        float aspect = size_y / size_x;
        return bound(1, floor((sqrt(4 * item_aspect * aspect * item_count + aspect * aspect) + aspect + 0.5) / 2), item_count);
 }
 
-vector HUD_GetTableSize(float item_count, vector psize, float item_aspect)
+vector HUD_GetTableSize(int item_count, vector psize, float item_aspect)
 {
        float columns, rows;
        float ratio, best_ratio = 0;
@@ -197,20 +197,20 @@ float stringwidth_nocolors(string s, vector theSize)
        return stringwidth(s, false, theSize);
 }
 
-void drawstringright(vector position, string text, vector theScale, vector rgb, float theAlpha, float flag)
+void drawstringright(vector position, string text, vector theScale, vector rgb, float theAlpha, int flag)
 {
        position.x -= 2 / 3 * strlen(text) * theScale.x;
        drawstring(position, text, theScale, rgb, theAlpha, flag);
 }
 
-void drawstringcenter(vector position, string text, vector theScale, vector rgb, float theAlpha, float flag)
+void drawstringcenter(vector position, string text, vector theScale, vector rgb, float theAlpha, int flag)
 {
        position.x = 0.5 * (vid_conwidth - 0.6025 * strlen(text) * theScale.x);
        drawstring(position, text, theScale, rgb, theAlpha, flag);
 }
 
 // return the string of the onscreen race timer
-string MakeRaceString(float cp, float mytime, float histime, float lapdelta, string hisname)
+string MakeRaceString(int cp, float mytime, float theirtime, float lapdelta, string theirname)
 {
        string col;
        string timestr;
@@ -218,7 +218,7 @@ string MakeRaceString(float cp, float mytime, float histime, float lapdelta, str
        string lapstr;
        lapstr = "";
 
-       if(histime == 0) // goal hit
+       if(theirtime == 0) // goal hit
        {
                if(mytime > 0)
                {
@@ -247,12 +247,12 @@ string MakeRaceString(float cp, float mytime, float histime, float lapdelta, str
                        col = "^1";
                }
        }
-       else if(histime > 0) // anticipation
+       else if(theirtime > 0) // anticipation
        {
-               if(mytime >= histime)
-                       timestr = strcat("+", ftos_decimals(mytime - histime, TIME_DECIMALS));
+               if(mytime >= theirtime)
+                       timestr = strcat("+", ftos_decimals(mytime - theirtime, TIME_DECIMALS));
                else
-                       timestr = TIME_ENCODED_TOSTRING(TIME_ENCODE(histime));
+                       timestr = TIME_ENCODED_TOSTRING(TIME_ENCODE(theirtime));
                col = "^3";
        }
        else
@@ -270,24 +270,25 @@ string MakeRaceString(float cp, float mytime, float histime, float lapdelta, str
        else
                cpname = _("Finish line");
 
-       if(histime < 0)
+       if(theirtime < 0)
                return strcat(col, cpname);
-       else if(hisname == "")
+       else if(theirname == "")
                return strcat(col, sprintf("%s (%s)", cpname, timestr));
        else
-               return strcat(col, sprintf("%s (%s %s)", cpname, timestr, strcat(hisname, col, lapstr)));
+               return strcat(col, sprintf("%s (%s %s)", cpname, timestr, strcat(theirname, col, lapstr)));
 }
 
 // Check if the given name already exist in race rankings? In that case, where? (otherwise return 0)
-float race_CheckName(string net_name) {
-       float i;
+int race_CheckName(string net_name)
+{
+       int i;
        for (i=RANKINGS_CNT-1;i>=0;--i)
                if(grecordholder[i] == net_name)
                        return i+1;
        return 0;
 }
 
-float GetPlayerColorForce(int i)
+int GetPlayerColorForce(int i)
 {
        if(!teamplay)
                return 0;
@@ -295,7 +296,7 @@ float GetPlayerColorForce(int i)
                return stof(getplayerkeyvalue(i, "colors")) & 15;
 }
 
-float GetPlayerColor(int i)
+int GetPlayerColor(int i)
 {
        if(!playerslots[i].gotscores) // unconnected
                return NUM_SPECTATOR;
@@ -324,7 +325,7 @@ HUD panels
 } while(0)
 
 //basically the same code of draw_ButtonPicture and draw_VertButtonPicture for the menu
-void HUD_Panel_DrawProgressBar(vector theOrigin, vector theSize, string pic, float length_ratio, float vertical, float baralign, vector theColor, float theAlpha, float drawflag)
+void HUD_Panel_DrawProgressBar(vector theOrigin, vector theSize, string pic, float length_ratio, bool vertical, float baralign, vector theColor, float theAlpha, int drawflag)
 {
        if(!length_ratio || !theAlpha)
                return;
@@ -427,7 +428,7 @@ void HUD_Panel_DrawProgressBar(vector theOrigin, vector theSize, string pic, flo
        }
 }
 
-void HUD_Panel_DrawHighlight(vector pos, vector mySize, vector color, float theAlpha, float drawflag)
+void HUD_Panel_DrawHighlight(vector pos, vector mySize, vector color, float theAlpha, int drawflag)
 {
        if(!theAlpha)
                return;
@@ -455,9 +456,9 @@ void weaponorder_swap(int i, int j, entity pass)
 }
 
 string weaponorder_cmp_str;
-float weaponorder_cmp(float i, float j, entity pass)
+int weaponorder_cmp(int i, int j, entity pass)
 {
-       float ai, aj;
+       int ai, aj;
        ai = strstrofs(weaponorder_cmp_str, sprintf(" %d ", weaponorder[i].weapon), 0);
        aj = strstrofs(weaponorder_cmp_str, sprintf(" %d ", weaponorder[j].weapon), 0);
        return aj - ai; // the string is in REVERSE order (higher prio at the right is what we want, but higher prio first is the string)
@@ -467,11 +468,12 @@ void HUD_Weapons(void)
 {
        // declarations
        WepSet weapons_stat = WepSet_GetFromStat();
-       float i, f, a;
+       int i;
+       float f, a;
        float screen_ar;
        vector center = '0 0 0';
-       float weapon_count, weapon_id;
-       float row, column, rows = 0, columns = 0;
+       int weapon_count, weapon_id;
+       int row, column, rows = 0, columns = 0;
        bool vertical_order = true;
        float aspect = autocvar_hud_panel_weapons_aspect;
 
@@ -598,7 +600,7 @@ void HUD_Weapons(void)
                if(padded_panel_size.x / padded_panel_size.y < aspect)
                {
                        // maximum number of rows that allows to display items with the desired aspect ratio
-                       float max_rows = floor(padded_panel_size.y / (weapon_size.x / aspect));
+                       int max_rows = floor(padded_panel_size.y / (weapon_size.x / aspect));
                        columns = min(columns, ceil(weapon_count / max_rows));
                        rows = ceil(weapon_count / columns);
                        weapon_size.y = min(padded_panel_size.y / rows, weapon_size.x / aspect);
@@ -607,7 +609,7 @@ void HUD_Weapons(void)
                }
                else
                {
-                       float max_columns = floor(padded_panel_size.x / (weapon_size.y * aspect));
+                       int max_columns = floor(padded_panel_size.x / (weapon_size.y * aspect));
                        rows = min(rows, ceil(weapon_count / max_columns));
                        columns = ceil(weapon_count / rows);
                        weapon_size.x = min(padded_panel_size.x / columns, aspect * weapon_size.y);
@@ -958,7 +960,7 @@ void DrawNadeScoreBar(vector myPos, vector mySize, vector color)
 
 }
 
-void DrawAmmoNades(vector myPos, vector mySize, float draw_expanding, float expand_time)
+void DrawAmmoNades(vector myPos, vector mySize, bool draw_expanding, float expand_time)
 {
        float theAlpha = 1, a, b;
        vector nade_color, picpos, numpos;
@@ -994,14 +996,14 @@ void DrawAmmoNades(vector myPos, vector mySize, float draw_expanding, float expa
        }
 }
 
-void DrawAmmoItem(vector myPos, vector mySize, .float ammoType, float isCurrent, float isInfinite)
+void DrawAmmoItem(vector myPos, vector mySize, .int ammoType, bool isCurrent, bool isInfinite)
 {
        if(ammoType == ammo_none)
                return;
 
        // Initialize variables
 
-       float ammo;
+       int ammo;
        if(autocvar__hud_configure)
        {
                isCurrent = (ammoType == ammo_rockets); // Rockets always current
@@ -1029,7 +1031,7 @@ void DrawAmmoItem(vector myPos, vector mySize, .float ammoType, float isCurrent,
                textPos = myPos + eX * mySize.y;
        }
 
-       float isShadowed = (ammo <= 0 && !isCurrent && !isInfinite);
+       bool isShadowed = (ammo <= 0 && !isCurrent && !isInfinite);
 
        vector iconColor = isShadowed ? '0 0 0' : '1 1 1';
        vector textColor;
@@ -1066,8 +1068,8 @@ void DrawAmmoItem(vector myPos, vector mySize, .float ammoType, float isCurrent,
        drawpic_aspect_skin(iconPos, GetAmmoPicture(ammoType), '1 1 0' * mySize.y, iconColor, alpha, DRAWFLAG_NORMAL);
 }
 
-float nade_prevstatus;
-float nade_prevframe;
+int nade_prevstatus;
+int nade_prevframe;
 float nade_statuschange_time;
 void HUD_Ammo(void)
 {
@@ -1093,10 +1095,11 @@ void HUD_Ammo(void)
                mySize -= '2 2 0' * panel_bg_padding;
        }
 
-       float rows = 0, columns, row, column;
+       int rows = 0, columns, row, column;
        float nade_cnt = getstatf(STAT_NADE_BONUS), nade_score = getstatf(STAT_NADE_BONUS_SCORE);
-       float draw_nades = (nade_cnt > 0 || nade_score > 0), nade_statuschange_elapsedtime;
-       float total_ammo_count;
+       bool draw_nades = (nade_cnt > 0 || nade_score > 0);
+       float nade_statuschange_elapsedtime;
+       int total_ammo_count;
 
        vector ammo_size;
        if (autocvar_hud_panel_ammo_onlycurrent)
@@ -1138,8 +1141,8 @@ void HUD_Ammo(void)
                ammo_size.y = newSize;
        }
 
-       float i;
-       float infinite_ammo = (getstati(STAT_ITEMS, 0, 24) & IT_UNLIMITED_WEAPON_AMMO);
+       int i;
+       bool infinite_ammo = (getstati(STAT_ITEMS, 0, 24) & IT_UNLIMITED_WEAPON_AMMO);
        row = column = 0;
        if(autocvar_hud_panel_ammo_onlycurrent)
        {
@@ -1167,7 +1170,7 @@ void HUD_Ammo(void)
        }
        else
        {
-               .float ammotype;
+               .int ammotype;
                row = column = 0;
                for(i = 0; i < AMMO_COUNT; ++i)
                {
@@ -1201,7 +1204,7 @@ void HUD_Ammo(void)
        draw_endBoldFont();
 }
 
-void DrawNumIcon_expanding(vector myPos, vector mySize, float x, string icon, float vertical, float icon_right_align, vector color, float theAlpha, float fadelerp)
+void DrawNumIcon_expanding(vector myPos, vector mySize, float x, string icon, bool vertical, bool icon_right_align, vector color, float theAlpha, float fadelerp)
 {
        vector newPos = '0 0 0', newSize = '0 0 0';
        vector picpos, numpos;
@@ -1280,7 +1283,7 @@ void DrawNumIcon_expanding(vector myPos, vector mySize, float x, string icon, fl
        drawpic_aspect_skin_expanding(picpos, icon, '1 1 0' * newSize.y, '1 1 1', panel_fg_alpha * theAlpha, DRAWFLAG_NORMAL, fadelerp);
 }
 
-void DrawNumIcon(vector myPos, vector mySize, float x, string icon, float vertical, float icon_right_align, vector color, float theAlpha)
+void DrawNumIcon(vector myPos, vector mySize, float x, string icon, bool vertical, bool icon_right_align, vector color, float theAlpha)
 {
        DrawNumIcon_expanding(myPos, mySize, x, icon, vertical, icon_right_align, color, theAlpha, 0);
 }
@@ -1331,10 +1334,10 @@ void HUD_Powerups(void)
        }
 
        float panel_ar = mySize.x/mySize.y;
-       float is_vertical = (panel_ar < 1);
+       bool is_vertical = (panel_ar < 1);
        vector shield_offset = '0 0 0', strength_offset = '0 0 0', superweapons_offset = '0 0 0';
 
-       float superweapons_is = -1;
+       int superweapons_is = -1;
 
        if(superweapons_time)
        {
@@ -1396,8 +1399,8 @@ void HUD_Powerups(void)
                }
        }
 
-       float shield_baralign, strength_baralign, superweapons_baralign;
-       float shield_iconalign, strength_iconalign, superweapons_iconalign;
+       bool shield_baralign, strength_baralign, superweapons_baralign;
+       bool shield_iconalign, strength_iconalign, superweapons_iconalign;
 
        if (autocvar_hud_panel_powerups_flip)
        {
@@ -1485,19 +1488,19 @@ void HUD_Powerups(void)
 
 // prev_* vars contain the health/armor at the previous FRAME
 // set to -1 when player is dead or was not playing
-float prev_health, prev_armor;
+int prev_health, prev_armor;
 float health_damagetime, armor_damagetime;
-float health_beforedamage, armor_beforedamage;
+int health_beforedamage, armor_beforedamage;
 // old_p_* vars keep track of previous values when smoothing value changes of the progressbar
-float old_p_health, old_p_armor;
+int old_p_health, old_p_armor;
 float old_p_healthtime, old_p_armortime;
 // prev_p_* vars contain the health/armor progressbar value at the previous FRAME
 // set to -1 to forcedly stop effects when we switch spectated player (e.g. from playerX: 70h to playerY: 50h)
-float prev_p_health, prev_p_armor;
+int prev_p_health, prev_p_armor;
 
 void HUD_HealthArmor(void)
 {
-       float armor, health, fuel;
+       int armor, health, fuel;
        if(!autocvar__hud_configure)
        {
                if(!autocvar_hud_panel_healtharmor) return;
@@ -1558,11 +1561,11 @@ void HUD_HealthArmor(void)
                mySize -= '2 2 0' * panel_bg_padding;
        }
 
-       float baralign = autocvar_hud_panel_healtharmor_baralign;
-       float iconalign = autocvar_hud_panel_healtharmor_iconalign;
+       int baralign = autocvar_hud_panel_healtharmor_baralign;
+       int iconalign = autocvar_hud_panel_healtharmor_iconalign;
 
-    float maxhealth = autocvar_hud_panel_healtharmor_maxhealth;
-    float maxarmor = autocvar_hud_panel_healtharmor_maxarmor;
+    int maxhealth = autocvar_hud_panel_healtharmor_maxhealth;
+    int maxarmor = autocvar_hud_panel_healtharmor_maxarmor;
        if(autocvar_hud_panel_healtharmor == 2) // combined health and armor display
        {
                vector v;
@@ -1600,7 +1603,7 @@ void HUD_HealthArmor(void)
        else
        {
                float panel_ar = mySize.x/mySize.y;
-               float is_vertical = (panel_ar < 1);
+               bool is_vertical = (panel_ar < 1);
                vector health_offset = '0 0 0', armor_offset = '0 0 0';
                if (panel_ar >= 4 || (panel_ar >= 1/4 && panel_ar < 1))
                {
@@ -1619,8 +1622,8 @@ void HUD_HealthArmor(void)
                                armor_offset.y = mySize.y;
                }
 
-               float health_baralign, armor_baralign, fuel_baralign;
-               float health_iconalign, armor_iconalign;
+               bool health_baralign, armor_baralign, fuel_baralign;
+               bool health_iconalign, armor_iconalign;
                if (autocvar_hud_panel_healtharmor_flip)
                {
                        armor_baralign = (autocvar_hud_panel_healtharmor_baralign == 2 || autocvar_hud_panel_healtharmor_baralign == 1);
@@ -1824,7 +1827,7 @@ void HUD_Notify(void)
        float fade_time = max(0, autocvar_hud_panel_notify_fadetime);
        float icon_aspect = max(1, autocvar_hud_panel_notify_icon_aspect);
 
-       float entry_count = bound(1, floor(NOTIFY_MAX_ENTRIES * size.y / size.x), NOTIFY_MAX_ENTRIES);
+       int entry_count = bound(1, floor(NOTIFY_MAX_ENTRIES * size.y / size.x), NOTIFY_MAX_ENTRIES);
        float entry_height = size.y / entry_count;
 
        float panel_width_half = size.x * 0.5;
@@ -1839,7 +1842,8 @@ void HUD_Notify(void)
 
        vector attacker_pos, victim_pos, icon_pos;
        string attacker, victim, icon;
-       float i, j, count, step, limit, alpha;
+       int i, j, count, step, limit;
+       float alpha;
 
        if (autocvar_hud_panel_notify_flip)
        {
@@ -2090,7 +2094,7 @@ void HUD_Radar(void)
                mySize -= '2 2 0' * panel_bg_padding;
        }
 
-       float color2;
+       int color2;
        entity tm;
        float scale2d, normalsize, bigsize;
 
@@ -2173,9 +2177,9 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me)
 {
        float score;
        entity tm = world, pl;
-       float SCOREPANEL_MAX_ENTRIES = 6;
+       int SCOREPANEL_MAX_ENTRIES = 6;
        float SCOREPANEL_ASPECTRATIO = 2;
-       float entries = bound(1, floor(SCOREPANEL_MAX_ENTRIES * mySize.y/mySize.x * SCOREPANEL_ASPECTRATIO), SCOREPANEL_MAX_ENTRIES);
+       int entries = bound(1, floor(SCOREPANEL_MAX_ENTRIES * mySize.y/mySize.x * SCOREPANEL_ASPECTRATIO), SCOREPANEL_MAX_ENTRIES);
        vector fontsize = '1 1 0' * (mySize.y/entries);
 
        vector rgb, score_color;
@@ -2185,7 +2189,8 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me)
        float name_size = mySize.x*0.75;
        float spacing_size = mySize.x*0.04;
        const float highlight_alpha = 0.2;
-       float i = 0, me_printed = 0, first_pl = 0;
+       int i = 0, first_pl = 0;
+       bool me_printed = false;
        string s;
        if (autocvar__hud_configure)
        {
@@ -2276,7 +2281,7 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me)
                {
                        if (i == first_pl)
                                rgb = '0 1 0'; //first: green
-                       me_printed = 1;
+                       me_printed = true;
                        drawfill(pos, eX * mySize.x + eY * fontsize.y, rgb, highlight_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                }
                if (team_count)
@@ -2620,13 +2625,13 @@ void HUD_RaceTimer (void)
 
 // Vote window (#9)
 //
-float vote_yescount;
-float vote_nocount;
-float vote_needed;
-float vote_highlighted; // currently selected vote
+int vote_yescount;
+int vote_nocount;
+int vote_needed;
+int vote_highlighted; // currently selected vote
 
-float vote_active; // is there an active vote?
-float vote_prev; // previous state of vote_active to check for a change
+int vote_active; // is there an active vote?
+int vote_prev; // previous state of vote_active to check for a change
 float vote_alpha;
 float vote_change; // "time" when vote_active changed
 
@@ -2770,11 +2775,11 @@ void HUD_Vote(void)
 // Mod icons panel (#10)
 //
 
-float mod_active; // is there any active mod icon?
+bool mod_active; // is there any active mod icon?
 
-void DrawCAItem(vector myPos, vector mySize, float aspect_ratio, int layout, float i)
+void DrawCAItem(vector myPos, vector mySize, float aspect_ratio, int layout, int i)
 {
-       float stat = -1;
+       int stat = -1;
        string pic = "";
        vector color = '0 0 0';
        switch(i)
@@ -2834,7 +2839,8 @@ void HUD_Mod_CA(vector myPos, vector mySize)
                layout = autocvar_hud_panel_modicons_ca_layout;
        else //if(gametype == MAPINFO_TYPE_FREEZETAG)
                layout = autocvar_hud_panel_modicons_freezetag_layout;
-       float rows, columns, aspect_ratio;
+       int rows, columns;
+       float aspect_ratio;
        aspect_ratio = (layout) ? 2 : 1;
        rows = HUD_GetRowCount(team_count, mySize, aspect_ratio);
        columns = ceil(team_count/rows);
@@ -2861,7 +2867,7 @@ void HUD_Mod_CA(vector myPos, vector mySize)
 // CTF HUD modicon section
 int redflag_prevframe, blueflag_prevframe, yellowflag_prevframe, pinkflag_prevframe, neutralflag_prevframe; // status during previous frame
 int redflag_prevstatus, blueflag_prevstatus, yellowflag_prevstatus, pinkflag_prevstatus, neutralflag_prevstatus; // last remembered status
-int redflag_statuschange_time, blueflag_statuschange_time, yellowflag_statuschange_time, pinkflag_statuschange_time, neutralflag_statuschange_time; // time when the status changed
+float redflag_statuschange_time, blueflag_statuschange_time, yellowflag_statuschange_time, pinkflag_statuschange_time, neutralflag_statuschange_time; // time when the status changed
 
 void HUD_Mod_CTF_Reset(void)
 {
@@ -3216,9 +3222,9 @@ void HUD_Mod_KH(vector pos, vector mySize)
 
        // Read current state
 
-       float state = getstati(STAT_KH_KEYS);
-       float i, key_state;
-       float all_keys, team1_keys, team2_keys, team3_keys, team4_keys, dropped_keys, carrying_keys;
+       int state = getstati(STAT_KH_KEYS);
+       int i, key_state;
+       int all_keys, team1_keys, team2_keys, team3_keys, team4_keys, dropped_keys, carrying_keys;
        all_keys = team1_keys = team2_keys = team3_keys = team4_keys = dropped_keys = carrying_keys = 0;
 
        for(i = 0; i < 4; ++i)
@@ -3337,7 +3343,7 @@ void HUD_Mod_KH(vector pos, vector mySize)
 }
 
 // Keepaway HUD mod icon
-float kaball_prevstatus; // last remembered status
+int kaball_prevstatus; // last remembered status
 float kaball_statuschange_time; // time when the status changed
 
 // we don't need to reset for keepaway since it immediately
@@ -3352,8 +3358,8 @@ void HUD_Mod_Keepaway(vector pos, vector mySize)
        float BLINK_FREQ = 5;
        float kaball_alpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ);
 
-       float stat_items = getstati(STAT_ITEMS, 0, 24);
-       float kaball = (stat_items/IT_KEY1) & 1;
+       int stat_items = getstati(STAT_ITEMS, 0, 24);
+       int kaball = (stat_items/IT_KEY1) & 1;
 
        if(kaball != kaball_prevstatus)
        {
@@ -3385,7 +3391,8 @@ void HUD_Mod_Keepaway(vector pos, vector mySize)
 // Nexball HUD mod icon
 void HUD_Mod_NexBall(vector pos, vector mySize)
 {
-       float stat_items, nb_pb_starttime, dt, p;
+       float nb_pb_starttime, dt, p;
+       int stat_items;
 
        stat_items = getstati(STAT_ITEMS, 0, 24);
        nb_pb_starttime = getstatf(STAT_NB_METERSTART);
@@ -3418,7 +3425,7 @@ float srecordtime_prev; // last remembered srecordtime
 float srecordtime_change_time; // time when srecordtime last changed
 
 float race_status_time;
-float race_status_prev;
+int race_status_prev;
 string race_status_name_prev;
 void HUD_Mod_Race(vector pos, vector mySize)
 {
@@ -3558,7 +3565,7 @@ void HUD_Mod_Race(vector pos, vector mySize)
        }
 }
 
-void DrawDomItem(vector myPos, vector mySize, float aspect_ratio, int layout, float i)
+void DrawDomItem(vector myPos, vector mySize, float aspect_ratio, int layout, int i)
 {
        float stat = -1;
        string pic = "";
@@ -3627,7 +3634,8 @@ void HUD_Mod_Dom(vector myPos, vector mySize)
        mod_active = 1; // required in each mod function that always shows something
 
        int layout = autocvar_hud_panel_modicons_dom_layout;
-       float rows, columns, aspect_ratio;
+       int rows, columns;
+       float aspect_ratio;
        aspect_ratio = (layout) ? 3 : 1;
        rows = HUD_GetRowCount(team_count, mySize, aspect_ratio);
        columns = ceil(team_count/rows);
@@ -3667,7 +3675,7 @@ void HUD_ModIcons_SetFunc()
        }
 }
 
-float mod_prev; // previous state of mod_active to check for a change
+int mod_prev; // previous state of mod_active to check for a change
 float mod_alpha;
 float mod_change; // "time" when mod_active changed
 
@@ -3861,7 +3869,7 @@ void HUD_Chat(void)
 //
 float prevfps;
 float prevfps_time;
-float framecounter;
+int framecounter;
 
 float frametimeavg;
 float frametimeavg1; // 1 frame ago
@@ -4217,7 +4225,7 @@ void HUD_Physics(void)
                else
                        acceleration_offset.y = panel_size.y;
        }
-       float speed_baralign, acceleration_baralign;
+       int speed_baralign, acceleration_baralign;
        if (autocvar_hud_panel_physics_baralign == 1)
                acceleration_baralign = speed_baralign = 1;
     else if(autocvar_hud_panel_physics_baralign == 4)
@@ -4373,21 +4381,21 @@ void HUD_Physics(void)
 
 // CenterPrint (#16)
 //
-const float CENTERPRINT_MAX_MSGS = 10;
-const float CENTERPRINT_MAX_ENTRIES = 50;
+const int CENTERPRINT_MAX_MSGS = 10;
+const int CENTERPRINT_MAX_ENTRIES = 50;
 const float CENTERPRINT_SPACING = 0.7;
-float cpm_index;
+int cpm_index;
 string centerprint_messages[CENTERPRINT_MAX_MSGS];
-float centerprint_msgID[CENTERPRINT_MAX_MSGS];
+int centerprint_msgID[CENTERPRINT_MAX_MSGS];
 float centerprint_time[CENTERPRINT_MAX_MSGS];
 float centerprint_expire_time[CENTERPRINT_MAX_MSGS];
-float centerprint_countdown_num[CENTERPRINT_MAX_MSGS];
-float centerprint_showing;
+int centerprint_countdown_num[CENTERPRINT_MAX_MSGS];
+bool centerprint_showing;
 
-void centerprint_generic(float new_id, string strMessage, float duration, float countdown_num)
+void centerprint_generic(int new_id, string strMessage, float duration, int countdown_num)
 {
        //printf("centerprint_generic(%d, '%s^7', %d, %d);\n", new_id, strMessage, duration, countdown_num);
-       float i, j;
+       int i, j;
 
        if(strMessage == "" && new_id == 0)
                return;
@@ -4467,7 +4475,7 @@ void centerprint_hud(string strMessage)
 
 void reset_centerprint_messages(void)
 {
-       float i;
+       int i;
        for (i=0; i<CENTERPRINT_MAX_MSGS; ++i)
        {
                centerprint_expire_time[i] = 0;
@@ -4544,7 +4552,8 @@ void HUD_CenterPrint (void)
                panel_size -= '2 2 0' * panel_bg_padding;
        }
 
-       float entries, height;
+       int entries;
+       float height;
        vector fontsize;
        // entries = bound(1, floor(CENTERPRINT_MAX_ENTRIES * 4 * panel_size_y/panel_size_x), CENTERPRINT_MAX_ENTRIES);
        // height = panel_size_y/entries;
@@ -4553,11 +4562,11 @@ void HUD_CenterPrint (void)
        fontsize = '1 1 0' * height;
        entries = bound(1, floor(panel_size.y/height), CENTERPRINT_MAX_ENTRIES);
 
-       float i, j, k, n, g;
+       int i, j, k, n, g;
        float a, sz, align, current_msg_posY = 0, msg_size;
        vector pos;
        string ts;
-       float all_messages_expired = true;
+       bool all_messages_expired = true;
 
        pos = panel_pos;
        if (autocvar_hud_panel_centerprint_flip)
@@ -4694,7 +4703,7 @@ void HUD_CenterPrint (void)
 //
 void HUD_Buffs(void)
 {
-       float buffs = getstati(STAT_BUFFS, 0, 24);
+       int buffs = getstati(STAT_BUFFS, 0, 24);
        if(!autocvar__hud_configure)
        {
                if(!autocvar_hud_panel_buffs) return;
@@ -4707,7 +4716,7 @@ void HUD_Buffs(void)
                buffs = Buff_Type_first.items; // force first buff
        }
 
-       float b = 0; // counter to tell other functions that we have buffs
+       int b = 0; // counter to tell other functions that we have buffs
        entity e;
        string s = "";
        for(e = Buff_Type_first; e; e = e.enemy) if(buffs & e.items)
@@ -4736,7 +4745,7 @@ void HUD_Buffs(void)
        }
 
        //float panel_ar = mySize_x/mySize_y;
-       //float is_vertical = (panel_ar < 1);
+       //bool is_vertical = (panel_ar < 1);
        //float buff_iconalign = autocvar_hud_panel_buffs_iconalign;
        vector buff_offset = '0 0 0';
 
@@ -4807,7 +4816,7 @@ void HUD_Main (void)
        // draw the dock
        if(autocvar_hud_dock != "" && autocvar_hud_dock != "0")
        {
-               float f;
+               int f;
                vector color;
                float hud_dock_color_team = autocvar_hud_dock_color_team;
                if((teamplay) && hud_dock_color_team) {
@@ -4850,13 +4859,14 @@ void HUD_Main (void)
                for(i = 0; i < HUD_PANEL_NUM; ++i)
                        panel_order[i] = -1;
                string s = "";
-               float p_num, warning = false;
-               float argc = tokenize_console(autocvar__hud_panelorder);
+               int p_num;
+               bool warning = false;
+               int argc = tokenize_console(autocvar__hud_panelorder);
                if (argc > HUD_PANEL_NUM)
                        warning = true;
                //first detect wrong/missing panel numbers
                for(i = 0; i < HUD_PANEL_NUM; ++i) {
-                       p_num = stof(argv(i));
+                       p_num = stoi(argv(i));
                        if (p_num >= 0 && p_num < HUD_PANEL_NUM) { //correct panel number?
                                if (panel_order[p_num] == -1) //found for the first time?
                                        s = strcat(s, ftos(p_num), " ");
index d2469851ca53f21c813d5bd629b01833f57f1847..24506bef0c18acc5d02f5a3560dd1f386a4c69ab 100644 (file)
@@ -31,7 +31,6 @@ void turret_precache(int _tid)
         precache_model ("models/turrets/head-gib2.md3");
         precache_model ("models/turrets/head-gib3.md3");
         precache_model ("models/turrets/head-gib4.md3");
-        precache_model ("models/turrets/terrainbase.md3");
         precache_model ("models/turrets/base.md3");
         precache_model ("models/turrets/rocket.md3");
     }
index 12ff5dc891de1be28de7d0e1e083bca4f4cd5337..1858b9bd114669237f96c03e0bd355d679ae772e 100644 (file)
@@ -86,7 +86,7 @@ void shambler_lightning_explode()
        self.nextthink = time + 0.2;
 }
 
-void shambler_lightning_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void shambler_lightning_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if (self.health <= 0)
                return;
index 28430e9617e8a9a6666519a444d39df47303a103..24ea1b9196c27545e56a8cd20750d8b959876d8d 100644 (file)
@@ -321,7 +321,7 @@ void monster_makevectors(entity e)
        makevectors(self.v_angle);
 }
 
-float monster_melee(entity targ, float damg, float anim, float er, float anim_finished, float deathtype, float dostop)
+float monster_melee(entity targ, float damg, float anim, float er, float anim_finished, int deathtype, float dostop)
 {
        if (self.health <= 0)
                return false; // attacking while dead?!
@@ -910,7 +910,7 @@ void monsters_reset()
        self.moveto = self.origin;
 }
 
-void monsters_corpse_damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void monsters_corpse_damage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        self.health -= damage;
 
@@ -979,7 +979,7 @@ void monster_die(entity attacker, float gibbed)
        MON_ACTION(self.monsterid, MR_DEATH);
 }
 
-void monsters_damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void monsters_damage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if(self.frozen && deathtype != DEATH_KILL && deathtype != DEATH_NADE_ICE_FREEZE)
                return;
index f6b149816e27725278d9f781e9bf8aff956034cb..697c07b72ea02197831154a4f9e560d1869c1b0e 100644 (file)
@@ -93,7 +93,7 @@ const int MONSTER_STATE_ATTACK_MELEE = 2;
 float monster_initialize(float mon_id);
 float monster_leap (float anm, void() touchfunc, vector vel, float anim_finished);
 void monster_makevectors(entity e);
-float monster_melee(entity targ, float damg, float anim, float er, float anim_finished, float deathtype, float dostop);
+float monster_melee(entity targ, float damg, float anim, float er, float anim_finished, int deathtype, float dostop);
 void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_run, float manim_walk, float manim_idle);
 void monster_setupcolors(entity mon);
 float Monster_SkillModifier();
index d11e4eabfb83d75157210ac8c3e3f145b4d6304f..505e2e2d541085369e74426b890bd9305f3fdc92 100644 (file)
@@ -104,7 +104,7 @@ string Nade_TrailEffect(float proj, float nade_team)
 }
 
 #ifdef SVQC
-float healer_send(entity to, float sf);
+float healer_send(entity to, int sf);
 #endif
 
 #ifdef CSQC
index b48daec7bcec244b831d8a74129eee9bfae826a8..7470cb88802edbcfe862ef36665ff800a3408dcc 100644 (file)
@@ -1633,7 +1633,7 @@ void Local_Notification(int net_type, int net_name, ...count)
 
                        if(notif.nent_challow_var && (warmup_stage || (notif.nent_challow_var == 2)))
                        {
-                               switch(cvar_string(sprintf("notification_%s", notif.nent_name)))
+                               switch(cvar(sprintf("notification_%s", notif.nent_name)))
                                {
                                        case 1: found_choice = notif.nent_optiona; break;
                                        case 2: found_choice = notif.nent_optionb; break;
@@ -1768,7 +1768,7 @@ void Net_Notification_Remove()
        remove(self);
 }
 
-float Net_Write_Notification(entity client, float sf)
+float Net_Write_Notification(entity client, int sf)
 {
        if(Notification_ShouldSend(self.nent_broadcast, client, self.nent_client))
        {
index ed4ebcf0615d26dfa52ea907ea96a190b5f6a6f5..f246200378ff5adcccb374212c0972797f4c9661 100644 (file)
     #define int float
 
     #define stoi(s) stof(s)
-    #define itos(s) ftos(s)
+    #define stob(s) stof(s)
+    #define itos(i) ftos(i)
+#else
+    #define stoi(s) ((int) stof(s))
+    #define stob(s) ((bool) stof(s))
+    #define itos(i) ftos(i)
 #endif
 
 #ifndef QCC_SUPPORT_BOOL
index 49d707f077be45adc59a7867322022ed9be41d96..f47bcf15ab0a8da92700c6b664c87e2a2e37c8ba 100644 (file)
@@ -1843,7 +1843,7 @@ void RandomSelection_Add(entity e, float f, string s, float weight, float priori
 }
 
 #ifndef MENUQC
-vector healtharmor_maxdamage(float h, float a, float armorblock, float deathtype)
+vector healtharmor_maxdamage(float h, float a, float armorblock, int deathtype)
 {
        // NOTE: we'll always choose the SMALLER value...
        float healthdamage, armordamage, armorideal;
@@ -1867,7 +1867,7 @@ vector healtharmor_maxdamage(float h, float a, float armorblock, float deathtype
        return v;
 }
 
-vector healtharmor_applydamage(float a, float armorblock, float deathtype, float damage)
+vector healtharmor_applydamage(float a, float armorblock, int deathtype, float damage)
 {
        vector v;
        if (deathtype == DEATH_DROWN)  // Why should armor help here...
index b2cdf8dcaf2232be15fb675e2140d4018d686b64..a59d31cacf18b1c9a5c64cf556ad14acffd0ab25 100644 (file)
@@ -214,8 +214,8 @@ void RandomSelection_Init();
 void RandomSelection_Add(entity e, float f, string s, float weight, float priority);
 
 #ifndef MENUQC
-vector healtharmor_maxdamage(float h, float a, float armorblock, float deathtype); // returns vector: maxdamage, armorideal, 1 if fully armored
-vector healtharmor_applydamage(float a, float armorblock, float deathtype, float damage); // returns vector: take, save, 0
+vector healtharmor_maxdamage(float h, float a, float armorblock, int deathtype); // returns vector: maxdamage, armorideal, 1 if fully armored
+vector healtharmor_applydamage(float a, float armorblock, int deathtype, float damage); // returns vector: take, save, 0
 #endif
 
 string getcurrentmod();
index d8faa7be97daead90da13c9ab84dbcd7e23a89c0..79d4dc7c7ad99fea7663a8f9cc4d6289d9d74efa 100644 (file)
@@ -127,7 +127,7 @@ vector Draw_ArcBeam_callback_last_bottom; // NOTE: in same coordinate system as
 #ifdef SVQC
 void spawnfunc_weapon_arc(void) { weapon_defaultspawnfunc(WEP_ARC); }
 
-float W_Arc_Beam_Send(entity to, float sf)
+float W_Arc_Beam_Send(entity to, int sf)
 {
        WriteByte(MSG_ENTITY, ENT_CLIENT_ARC_BEAM);
 
@@ -239,6 +239,8 @@ void W_Arc_Beam_Think(void)
                ||
                self.owner.frozen
                ||
+               self.owner.vehicle
+               ||
                (WEP_CVAR(arc, overheat_max) > 0 && self.beam_heat >= WEP_CVAR(arc, overheat_max))
        )
        {
@@ -272,6 +274,7 @@ void W_Arc_Beam_Think(void)
                entity oldself = self;
                self = self.owner;
                if(!WEP_ACTION(WEP_ARC, WR_CHECKAMMO1) && !WEP_ACTION(WEP_ARC, WR_CHECKAMMO2))
+               if(!(self.items & IT_UNLIMITED_WEAPON_AMMO))
                {
                        // note: this doesn't force the switch
                        W_SwitchToOtherWeapon(self);
@@ -633,7 +636,7 @@ void Arc_Smoke()
        }
 }
 
-float W_Arc(float req)
+bool W_Arc(int req)
 {
        switch(req)
        {
@@ -1518,7 +1521,7 @@ void Ent_ReadArcBeam(float isnew)
        }
 }
 
-float W_Arc(float req)
+bool W_Arc(int req)
 {
        switch(req)
        {
index 8eaff86e35241899d5a760600f858b451e1c11f6..a776edbf4f5a383b2ae5fb136a68cc33c6f3c546 100644 (file)
@@ -147,7 +147,7 @@ void W_Blaster_Attack(
                self = oldself;
        }
 }
-float W_Blaster(float request)
+bool W_Blaster(int request)
 {
        switch(request)
        {
@@ -266,7 +266,7 @@ float W_Blaster(float request)
 }
 #endif
 #ifdef CSQC
-float W_Blaster(float request)
+bool W_Blaster(int request)
 {
        switch(request)
        {
index 21a86e7da0c33f7d901584c194b4575a450ca47e..4d4430206feab00a0f9c965bc5174782d4ce3fbd 100644 (file)
@@ -563,7 +563,7 @@ void W_Crylink_Attack2(void)
        }
 }
 
-float W_Crylink(float req)
+bool W_Crylink(int req)
 {
        float ammo_amount;
        switch(req)
@@ -689,7 +689,7 @@ float W_Crylink(float req)
 }
 #endif
 #ifdef CSQC
-float W_Crylink(float req)
+bool W_Crylink(int req)
 {
        switch(req)
        {
index 9e5f98a492033c49f1121aa6f72ce30e0793a8b5..618c2e5358f4f4d2fd05463b85dac1a5006f6b4f 100644 (file)
@@ -103,6 +103,7 @@ void W_Devastator_Explode(void)
        if(self.realowner.weapon == WEP_DEVASTATOR)
        {
                if(self.realowner.WEP_AMMO(DEVASTATOR) < WEP_CVAR(devastator, ammo))
+               if(!(self.realowner.items & IT_UNLIMITED_WEAPON_AMMO))
                {
                        self.realowner.cnt = WEP_DEVASTATOR;
                        ATTACK_FINISHED(self.realowner) = time;
@@ -181,6 +182,7 @@ void W_Devastator_DoRemoteExplode(void)
        if(self.realowner.weapon == WEP_DEVASTATOR)
        {
                if(self.realowner.WEP_AMMO(DEVASTATOR) < WEP_CVAR(devastator, ammo))
+               if(!(self.realowner.items & IT_UNLIMITED_WEAPON_AMMO))
                {
                        self.realowner.cnt = WEP_DEVASTATOR;
                        ATTACK_FINISHED(self.realowner) = time;
@@ -317,7 +319,7 @@ void W_Devastator_Touch(void)
        W_Devastator_Explode();
 }
 
-void W_Devastator_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void W_Devastator_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if(self.health <= 0)
                return;
@@ -389,7 +391,7 @@ void W_Devastator_Attack(void)
        other = missile; MUTATOR_CALLHOOK(EditProjectile);
 }
 
-float W_Devastator(float req)
+bool W_Devastator(int req)
 {
        entity rock;
        float rockfound;
@@ -653,7 +655,7 @@ float W_Devastator(float req)
 }
 #endif
 #ifdef CSQC
-float W_Devastator(float req)
+bool W_Devastator(int req)
 {
        switch(req)
        {
index 3f5e75159b5b8339490f0eb2c8aff57664e2fa65..e3b809296be709e884c8d993aff7a1730e897668 100644 (file)
@@ -300,7 +300,7 @@ void W_Electro_Orb_Touch(void)
        }
 }
 
-void W_Electro_Orb_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void W_Electro_Orb_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if(self.health <= 0)
                return;
@@ -419,7 +419,7 @@ void W_Electro_CheckAttack(void)
 }
 
 .float bot_secondary_electromooth;
-float W_Electro(float req)
+bool W_Electro(int req)
 {
        float ammo_amount;
        switch(req)
@@ -569,7 +569,7 @@ float W_Electro(float req)
 }
 #endif
 #ifdef CSQC
-float W_Electro(float req)
+bool W_Electro(int req)
 {
        switch(req)
        {
index d0980091353b01615c9475f8ec9fd1caa1ee0736..7bb5ccb66c7ebf97e2c9588739eca324b74c65a9 100644 (file)
@@ -161,7 +161,7 @@ void W_Fireball_Think(void)
        self.nextthink = time + 0.1;
 }
 
-void W_Fireball_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void W_Fireball_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if(self.health <= 0)
                return;
@@ -347,7 +347,7 @@ void W_Fireball_Attack2(void)
        other = proj; MUTATOR_CALLHOOK(EditProjectile);
 }
 
-float W_Fireball(float req)
+bool W_Fireball(int req)
 {
        switch(req)
        {
@@ -447,7 +447,7 @@ float W_Fireball(float req)
 }
 #endif
 #ifdef CSQC
-float W_Fireball(float req)
+bool W_Fireball(int req)
 {
        switch(req)
        {
index 1085c315afae03ef3992de648a29ad3c48344097..4c9f664989d2a77852acca35b5eb13127c60c648 100644 (file)
@@ -75,7 +75,7 @@ void W_Hagar_Explode2(void)
        remove(self);
 }
 
-void W_Hagar_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void W_Hagar_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if(self.health <= 0)
                return;
@@ -299,7 +299,9 @@ void W_Hagar_Attack2_Load(void)
        loaded = self.hagar_load >= WEP_CVAR_SEC(hagar, load_max);
 
        // this is different than WR_CHECKAMMO when it comes to reloading
-       if(autocvar_g_balance_hagar_reload_ammo)
+       if(self.items & IT_UNLIMITED_WEAPON_AMMO)
+               enough_ammo = true;
+       else if(autocvar_g_balance_hagar_reload_ammo)
                enough_ammo = self.(weapon_load[WEP_HAGAR]) >= WEP_CVAR_SEC(hagar, ammo);
        else
                enough_ammo = self.WEP_AMMO(HAGAR) >= WEP_CVAR_SEC(hagar, ammo);
@@ -383,6 +385,7 @@ void W_Hagar_Attack2_Load(void)
 
        // we aren't checking ammo during an attack, so we must do it here
        if(!(WEP_ACTION(self.weapon, WR_CHECKAMMO1) + WEP_ACTION(self.weapon, WR_CHECKAMMO2)))
+       if(!(self.items & IT_UNLIMITED_WEAPON_AMMO))
        {
                // note: this doesn't force the switch
                W_SwitchToOtherWeapon(self);
@@ -390,7 +393,7 @@ void W_Hagar_Attack2_Load(void)
        }
 }
 
-float W_Hagar(float req)
+bool W_Hagar(int req)
 {
        float ammo_amount;
        switch(req)
@@ -519,7 +522,7 @@ float W_Hagar(float req)
 }
 #endif
 #ifdef CSQC
-float W_Hagar(float req)
+bool W_Hagar(int req)
 {
        switch(req)
        {
index 38f04841a727eb5b574f5333f303eb0feb1cc253..7f7d7a27b27e05cf37b205b718e22b1c1a20e849 100644 (file)
@@ -203,7 +203,7 @@ void W_HLAC_Attack2_Frame(void)
        }
 }
 
-float W_HLAC(float req)
+bool W_HLAC(int req)
 {
        float ammo_amount;
        switch(req)
@@ -282,7 +282,7 @@ float W_HLAC(float req)
 }
 #endif
 #ifdef CSQC
-float W_HLAC(float req)
+bool W_HLAC(int req)
 {
        switch(req)
        {
index 8190411cd648ebd829a1758db8762bb8fd7c1c7e..de9c983b2850f24f6777f687f50975eb43ce24d1 100644 (file)
@@ -85,7 +85,7 @@ void W_HeavyMachineGun_Attack_Auto()
        weapon_thinkf(WFRAME_FIRE1, WEP_CVAR(hmg, refire), W_HeavyMachineGun_Attack_Auto);
 }
 
-float W_HeavyMachineGun(float req)
+bool W_HeavyMachineGun(int req)
 {
        float ammo_amount;
        switch(req)
@@ -169,7 +169,7 @@ float W_HeavyMachineGun(float req)
 }
 #endif
 #ifdef CSQC
-float W_HeavyMachineGun(float req)
+bool W_HeavyMachineGun(int req)
 {
        switch(req)
        {
index 5d52dabaebba0ccc6e15f078de7a71cbb9ce0493..1c05c23d69c2ca84bf3a3a4abcc2abb884d36f34 100644 (file)
@@ -108,7 +108,7 @@ void W_Hook_Explode2(void)
        self.movetype = MOVETYPE_NONE;
 }
 
-void W_Hook_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void W_Hook_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if(self.health <= 0)
                return;
@@ -173,7 +173,7 @@ void W_Hook_Attack2(void)
        other = gren; MUTATOR_CALLHOOK(EditProjectile);
 }
 
-float W_Hook(float req)
+bool W_Hook(int req)
 {
        float hooked_time_max, hooked_fuel;
 
@@ -336,7 +336,7 @@ float W_Hook(float req)
 }
 #endif
 #ifdef CSQC
-float W_Hook(float req)
+bool W_Hook(int req)
 {
        switch(req)
        {
index 14a59e39892583450992262c11cdff7dd9c92cc0..24a0db83f44534a4c7ff3cfbd453851b86796621 100644 (file)
@@ -101,7 +101,7 @@ void W_MachineGun_MuzzleFlash(void)
        self.muzzle_flash.owner = self.muzzle_flash.realowner = self;
 }
 
-void W_MachineGun_Attack(float deathtype)
+void W_MachineGun_Attack(int deathtype)
 {
        W_SetupShot(self, true, 0, "weapons/uzi_fire.wav", CH_WEAPON_A, ((self.misc_bulletcounter == 1) ? WEP_CVAR(machinegun, first_damage) : WEP_CVAR(machinegun, sustained_damage)));
        if(!autocvar_g_norecoil)
@@ -235,7 +235,7 @@ void W_MachineGun_Attack_Burst(void)
 
 }
 
-float W_MachineGun(float req)
+bool W_MachineGun(int req)
 {
        float ammo_amount;
        switch(req)
@@ -369,7 +369,7 @@ float W_MachineGun(float req)
 }
 #endif
 #ifdef CSQC
-float W_MachineGun(float req)
+bool W_MachineGun(int req)
 {
        switch(req)
        {
index 2fe0172a9435d1d195e71c8d5e7b0cb4e38d7386..d4ef9554702af9628800348dd0180e84baf6c90c 100644 (file)
@@ -194,9 +194,9 @@ void W_MineLayer_ProximityExplode(void)
        W_MineLayer_Explode();
 }
 
-float W_MineLayer_Count(entity e)
+int W_MineLayer_Count(entity e)
 {
-       float minecount = 0;
+       int minecount = 0;
        entity mine;
        for(mine = world; (mine = find(mine, classname, "mine")); ) if(mine.realowner == e)
                minecount += 1;
@@ -290,7 +290,7 @@ void W_MineLayer_Touch(void)
        }
 }
 
-void W_MineLayer_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void W_MineLayer_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if(self.health <= 0)
                return;
@@ -400,7 +400,7 @@ float W_MineLayer_PlacedMines(float detonate)
        return minfound;
 }
 
-float W_MineLayer(float req)
+bool W_MineLayer(int req)
 {
        entity mine;
        float ammo_amount;
@@ -591,7 +591,7 @@ float W_MineLayer(float req)
 }
 #endif
 #ifdef CSQC
-float W_MineLayer(float req)
+bool W_MineLayer(int req)
 {
        switch(req)
        {
index 34b5e57473cbf8d6a0e8eb774d3ea78bc258b62e..c958372afb8177ba8e8bf5c205cd32abf8614836 100644 (file)
@@ -99,7 +99,7 @@ void W_Mortar_Grenade_Explode2(void)
 }
 
 
-void W_Mortar_Grenade_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void W_Mortar_Grenade_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if(self.health <= 0)
                return;
@@ -319,7 +319,7 @@ void W_Mortar_Attack2(void)
 }
 
 .float bot_secondary_grenademooth;
-float W_Mortar(float req)
+bool W_Mortar(int req)
 {
        entity nade;
        float nadefound;
@@ -459,7 +459,7 @@ float W_Mortar(float req)
 }
 #endif
 #ifdef CSQC
-float W_Mortar(float req)
+bool W_Mortar(int req)
 {
        switch(req)
        {
index 0010449a025923feff26357579fc0a98fd2fe9d0..01b1ab6489c4133b987d1cf36223554839d6f600 100644 (file)
@@ -284,8 +284,8 @@ void W_Porto_Attack(float type)
        other = gren; MUTATOR_CALLHOOK(EditProjectile);
 }
 
-float w_nexball_weapon(float req); // WEAPONTODO
-float W_Porto(float req)
+bool w_nexball_weapon(int req); // WEAPONTODO
+bool W_Porto(int req)
 {
        //vector v_angle_save;
 
@@ -396,7 +396,7 @@ float W_Porto(float req)
 }
 #endif
 #ifdef CSQC
-float W_Porto(float req)
+bool W_Porto(int req)
 {
        switch(req)
        {
index f20872f7045067fb300a1c24ffd6240a0af5e773..16d6ad6f833925fb510fe37d8182b758a10ea4c8 100644 (file)
@@ -50,7 +50,7 @@ void spawnfunc_weapon_rifle(void) { weapon_defaultspawnfunc(WEP_RIFLE); }
 void spawnfunc_weapon_campingrifle(void) { spawnfunc_weapon_rifle(); }
 void spawnfunc_weapon_sniperrifle(void) { spawnfunc_weapon_rifle(); }
 
-void W_Rifle_FireBullet(float pSpread, float pDamage, float pForce, float pSolidPenetration, float pAmmo, float deathtype, float pTracer, float pShots, string pSound)
+void W_Rifle_FireBullet(float pSpread, float pDamage, float pForce, float pSolidPenetration, float pAmmo, int deathtype, float pTracer, float pShots, string pSound)
 {
        float i;
 
@@ -133,7 +133,7 @@ void W_Rifle_BulletHail(float mode, void(void) AttackFunc, float fr, float animt
 }
 
 .float bot_secondary_riflemooth;
-float W_Rifle(float req)
+bool W_Rifle(int req)
 {
        float ammo_amount;
 
@@ -264,7 +264,7 @@ float W_Rifle(float req)
 }
 #endif
 #ifdef CSQC
-float W_Rifle(float req)
+bool W_Rifle(int req)
 {
        switch(req)
        {
index 387dc32d82eb5c891bc40b3a8fbbdd6e6a70a50e..d641572c343f87c7a01c151cc61ca9ec8ef235cf 100644 (file)
@@ -65,7 +65,7 @@ void W_RocketPropelledChainsaw_Touch (void)
        W_RocketPropelledChainsaw_Explode();
 }
 
-void W_RocketPropelledChainsaw_Damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void W_RocketPropelledChainsaw_Damage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if (self.health <= 0)
                return;
@@ -146,7 +146,7 @@ void W_RocketPropelledChainsaw_Attack (void)
        other = missile; MUTATOR_CALLHOOK(EditProjectile);
 }
 
-float W_RocketPropelledChainsaw(float req)
+bool W_RocketPropelledChainsaw(int req)
 {
        float ammo_amount = false;
        switch(req)
@@ -232,7 +232,7 @@ float W_RocketPropelledChainsaw(float req)
 #endif
 
 #ifdef CSQC
-float W_RocketPropelledChainsaw(float req)
+bool W_RocketPropelledChainsaw(int req)
 {
        switch(req)
        {
index 45a121ab40bef47b03a42f32090dcf3b6fed3c84..f338ed7ea376d43ccad3d00ca30f4e047a02894b 100644 (file)
@@ -200,7 +200,7 @@ void W_Seeker_Missile_Think(void)
 
 
 
-void W_Seeker_Missile_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void W_Seeker_Missile_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if(self.health <= 0)
                return;
@@ -482,7 +482,7 @@ void W_Seeker_Tag_Explode(void)
        remove(self);
 }
 
-void W_Seeker_Tag_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void W_Seeker_Tag_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if(self.health <= 0)
                return;
@@ -596,7 +596,7 @@ void W_Seeker_Fire_Tag(void)
 // Begin: Genereal weapon functions
 // ============================
 
-float W_Seeker(float req)
+bool W_Seeker(int req)
 {
        float ammo_amount;
 
@@ -725,7 +725,7 @@ float W_Seeker(float req)
 }
 #endif
 #ifdef CSQC
-float W_Seeker(float req)
+bool W_Seeker(int req)
 {
        switch(req)
        {
index 3f40c5397fcfb8d34b96f4db4e0132c8b07bc5d1..d23ce753a57d383b4c885b23cc6a48b0be12cd1f 100644 (file)
@@ -665,7 +665,7 @@ void W_Shockwave_Attack(void)
        }
 }
 
-float W_Shockwave(float req)
+bool W_Shockwave(int req)
 {
        switch(req)
        {
@@ -864,7 +864,7 @@ void Net_ReadShockwaveParticle(void)
        shockwave.sw_time = time;
 }
 
-float W_Shockwave(float req)
+bool W_Shockwave(int req)
 {
        switch(req)
        {
index 0b70b85729fe463d832bfc0b6e8edc0e5b211efe..3c40519d6330b06d7b8cdfb4719f0884c7a69828 100644 (file)
@@ -55,7 +55,7 @@ float W_Tuba_MarkClientOnlyFieldsAsUsed() {
 #ifdef SVQC
 void spawnfunc_weapon_tuba(void) { weapon_defaultspawnfunc(WEP_TUBA); }
 
-float W_Tuba_HasPlayed(entity pl, string melody, float instrument, float ignorepitch, float mintempo, float maxtempo)
+bool W_Tuba_HasPlayed(entity pl, string melody, int instrument, bool ignorepitch, float mintempo, float maxtempo)
 {
        float i, j, mmin, mmax, nolength;
        float n = tokenize_console(melody);
@@ -182,7 +182,7 @@ void W_Tuba_NoteOff(void)
        remove(self);
 }
 
-float W_Tuba_GetNote(entity pl, float hittype)
+int W_Tuba_GetNote(entity pl, int hittype)
 {
        float movestate = 5;
        if (pl.movement.x < 0)          movestate -= 3;
@@ -190,7 +190,7 @@ float W_Tuba_GetNote(entity pl, float hittype)
        if (pl.movement.y < 0)          movestate -= 1;
        else if (pl.movement.y > 0)     movestate += 1;
 
-       float note = 0;
+       int note = 0;
        switch(movestate)
        {
        // layout: originally I wanted
@@ -250,9 +250,9 @@ float W_Tuba_GetNote(entity pl, float hittype)
        return note;
 }
 
-float W_Tuba_NoteSendEntity(entity to, float sf)
+bool W_Tuba_NoteSendEntity(entity to, int sf)
 {
-       float f;
+       int f;
 
        msg_entity = to;
        if(!sound_allowed(MSG_ONE, self.realowner))
@@ -367,7 +367,7 @@ void W_Tuba_NoteOn(float hittype)
        }
 }
 
-float W_Tuba(float req)
+bool W_Tuba(int req)
 {
        switch(req)
        {
@@ -493,7 +493,7 @@ float W_Tuba(float req)
 }
 #endif
 #ifdef CSQC
-float W_Tuba(float req)
+bool W_Tuba(int req)
 {
        // nothing to do here; particles of tuba are handled differently
        // WEAPONTODO
index 374256403d88def7a6fde94d0526e3a51f3b98e8..3c0d21354de46d73af552d758ab95f81bd293f10 100644 (file)
@@ -53,6 +53,8 @@ REGISTER_WEAPON(
 
 #ifdef SVQC
 VORTEX_SETTINGS(WEP_ADD_CVAR, WEP_ADD_PROP)
+
+.float vortex_lasthit;
 #endif
 #else
 #ifdef SVQC
@@ -107,10 +109,18 @@ void W_Vortex_Attack(float issecondary)
        }
 
        yoda = 0;
+       damage_goodhits = 0;
        FireRailgunBullet(w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, WEP_VORTEX);
 
        if(yoda && flying)
                Send_Notification(NOTIF_ONE, self, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA);
+       if(damage_goodhits && self.vortex_lasthit)
+       {
+               Send_Notification(NOTIF_ONE, self, MSG_ANNCE, ANNCE_ACHIEVEMENT_IMPRESSIVE);
+               damage_goodhits = 0; // only every second time
+       }
+
+       self.vortex_lasthit = damage_goodhits;
 
        //beam and muzzle flash done on client
        SendCSQCVortexBeamParticle(charge);
@@ -121,7 +131,7 @@ void W_Vortex_Attack(float issecondary)
 void spawnfunc_weapon_vortex(void); // defined in t_items.qc
 
 .float vortex_chargepool_pauseregen_finished;
-float W_Vortex(float req)
+bool W_Vortex(int req)
 {
        float dt;
        float ammo_amount;
@@ -254,6 +264,11 @@ float W_Vortex(float req)
                        VORTEX_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
                        return true;
                }
+               case WR_SETUP:
+               {
+                       self.vortex_lasthit = 0;
+                       return true;
+               }
                case WR_CHECKAMMO1:
                {
                        ammo_amount = self.WEP_AMMO(VORTEX) >= WEP_CVAR_PRI(vortex, ammo);
@@ -279,6 +294,11 @@ float W_Vortex(float req)
                        VORTEX_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
                        return true;
                }
+               case WR_RESETPLAYER:
+               {
+                       self.vortex_lasthit = 0;
+                       return true;
+               }
                case WR_RELOAD:
                {
                        W_Reload(min(WEP_CVAR_PRI(vortex, ammo), WEP_CVAR_SEC(vortex, ammo)), "weapons/reload.wav");
@@ -298,7 +318,7 @@ float W_Vortex(float req)
 #endif
 #ifdef CSQC
 float autocvar_g_balance_vortex_secondary = 0; // WEAPONTODO
-float W_Vortex(float req)
+bool W_Vortex(int req)
 {
        switch(req)
        {
index 55fcc0e14ffa597cbfaace6da0d52f09a4329f4d..3ab584fc1e7fb63d8be9dd8ec2b73c88d0996819 100644 (file)
@@ -64,7 +64,7 @@ entity dummy_weapon_info;
 # error Kein Weltraum links auf dem Gerät
 #endif
 
-WepSet WepSet_FromWeapon(float a) {
+WepSet WepSet_FromWeapon(int a) {
        a -= WEP_FIRST;
 #if WEP_MAXCOUNT > 24
        if(a >= 24) {
@@ -130,10 +130,10 @@ WepSet ReadWepSet()
 void register_weapon(
        int id,
        WepSet bit,
-       float(float) func,
-       .float ammotype,
-       float i,
-       float weapontype,
+       bool(int) func,
+       .int ammotype,
+       int i,
+       int weapontype,
        float pickupbasevalue,
        vector clr,
        string modelname,
@@ -169,7 +169,7 @@ void register_weapon(
        func(WR_INIT);
        #endif
 }
-float w_null(float dummy)
+bool w_null(int dummy)
 {
        return 0;
 }
@@ -246,7 +246,7 @@ string W_NameWeaponOrder(string order)
 }
 string W_NumberWeaponOrder_MapFunc(string s)
 {
-       float i;
+       int i;
        if(s == "0" || stof(s))
                return s;
        s = W_UndeprecateName(s);
@@ -312,7 +312,7 @@ string W_FixWeaponOrder_ForceComplete(string order)
 
 void W_RandomWeapons(entity e, float n)
 {
-       float i, j;
+       int i, j;
        WepSet remaining;
        WepSet result;
        remaining = e.weapons;
@@ -329,7 +329,7 @@ void W_RandomWeapons(entity e, float n)
        e.weapons = result;
 }
 
-string GetAmmoPicture(.float ammotype)
+string GetAmmoPicture(.int ammotype)
 {
        switch(ammotype)
        {
@@ -344,7 +344,7 @@ string GetAmmoPicture(.float ammotype)
 }
 
 #ifdef CSQC
-.float GetAmmoFieldFromNum(int i)
+.int GetAmmoFieldFromNum(int i)
 {
        switch(i)
        {
@@ -358,7 +358,7 @@ string GetAmmoPicture(.float ammotype)
        }
 }
 
-int GetAmmoStat(.float ammotype)
+int GetAmmoStat(.int ammotype)
 {
        switch(ammotype)
        {
index 7ac8a9e8dfa09ddacc034db56f0debb6a7014c07..593a40e3e8d8f40d9620096981ad4082954a9ab6 100644 (file)
@@ -48,7 +48,7 @@ string weaponorder_byid;
 
 // weapon sets
 typedef vector WepSet;
-WepSet WepSet_FromWeapon(float a);
+WepSet WepSet_FromWeapon(int a);
 #ifdef SVQC
 void WepSet_AddStat();
 void WriteWepSet(float dest, WepSet w);
@@ -67,7 +67,7 @@ WepSet WEPSET_ALL;
 WepSet WEPSET_SUPERWEAPONS;
 
 // functions:
-entity get_weaponinfo(float id);
+entity get_weaponinfo(int id);
 string W_FixWeaponOrder(string order, float complete);
 string W_UndeprecateName(string s);
 string W_NameWeaponOrder(string order);
@@ -77,21 +77,21 @@ string W_FixWeaponOrder_AllowIncomplete(string order);
 string W_FixWeaponOrder_ForceComplete(string order);
 void W_RandomWeapons(entity e, float n);
 
-string GetAmmoPicture(.float ammotype);
+string GetAmmoPicture(.int ammotype);
 
 #ifdef CSQC
-.float GetAmmoFieldFromNum(int i);
-int GetAmmoStat(.float ammotype);
+.int GetAmmoFieldFromNum(int i);
+int GetAmmoStat(.int ammotype);
 #endif
 
 // ammo types
-.float ammo_shells;
-.float ammo_nails;
-.float ammo_rockets;
-.float ammo_cells;
-.float ammo_plasma;
-.float ammo_fuel;
-.float ammo_none;
+.int ammo_shells;
+.int ammo_nails;
+.int ammo_rockets;
+.int ammo_cells;
+.int ammo_plasma;
+.int ammo_fuel;
+.int ammo_none;
 
 // other useful macros
 #define WEP_ACTION(wpn,wrequest) (get_weaponinfo(wpn)).weapon_func(wrequest)
@@ -134,15 +134,15 @@ int GetAmmoStat(.float ammotype);
 //  Weapon Registration
 // =====================
 
-float w_null(float dummy);
+bool w_null(int dummy);
 
 void register_weapon(
-       float id,
+       int id,
        WepSet bit,
-       float(float) func,
-       .float ammotype,
-       float i,
-       float weapontype,
+       bool(int) func,
+       .int ammotype,
+       int i,
+       int weapontype,
        float pickupbasevalue,
        vector clr,
        string modelname,
@@ -159,7 +159,7 @@ void register_weapons_done();
 .int weapon;                // M: WEP_id    // WEP_...
 .WepSet weapons;            // A: WEPSET_id // WEPSET_...
 .float(float) weapon_func;  // M: function  // w_...
-..float ammo_field;         // M: ammotype  // main ammo field
+..int ammo_field;         // M: ammotype  // main ammo field
 .int impulse;               // M: impulse   // weapon impulse
 .int spawnflags;            // M: flags     // WEPSPAWNFLAG_... combined
 .float bot_pickupbasevalue; // M: rating    // bot weapon priority
@@ -179,7 +179,7 @@ void register_weapons_done();
 #define REGISTER_WEAPON_2(id,bit,function,ammotype,impulse,flags,rating,color,modelname,simplemdl,crosshair,wepimg,refname,wepname) \
        int id; \
        WepSet bit; \
-       float function(float); \
+       bool function(int); \
        void RegisterWeapons_##id() \
        { \
                WEP_LAST = (id = WEP_FIRST + WEP_COUNT); \
index 6d3542bd0028ad55f84a4c817e4c78b5f6bf1d16..95489ad4326de10d9874c5fd29118e1cdd3ba8cc 100644 (file)
@@ -68,7 +68,7 @@ void CSQCModel_InterpolateAnimation_1To2_PreNote(int sf)
                self.frame2time = self.frame1time;
        }
 }
-void CSQCModel_InterpolateAnimation_PreNote(float sf)
+void CSQCModel_InterpolateAnimation_PreNote(int sf)
 {
 #ifdef CSQCMODEL_HAVE_TWO_FRAMES
        CSQCModel_InterpolateAnimation_2To4_PreNote(sf);
@@ -104,7 +104,7 @@ void CSQCModel_InterpolateAnimation_1To2_Note(int sf, float set_times)
                        self.frame1time = time;
        }
 }
-void CSQCModel_InterpolateAnimation_Note(float sf)
+void CSQCModel_InterpolateAnimation_Note(int sf)
 {
 #ifdef CSQCMODEL_HAVE_TWO_FRAMES
        CSQCModel_InterpolateAnimation_2To4_Note(sf, true);
index c2aca6f7a2677a9291b294ca17cbbea5f8377063..98f1da03b49561fb6e3b7ac272196f87622615b2 100644 (file)
@@ -42,12 +42,12 @@ entity CSQCModel_server2csqc(float pl);
 
 // this is exported for custom frame animation code. Use with care.
 // to update frames, first call this:
-void CSQCModel_InterpolateAnimation_2To4_PreNote(float sf);
-void CSQCModel_InterpolateAnimation_1To2_PreNote(float sf);
+void CSQCModel_InterpolateAnimation_2To4_PreNote(int sf);
+void CSQCModel_InterpolateAnimation_1To2_PreNote(int sf);
 // then update frame, frame1time (and possibly frame2, frame2time, lerpfrac)
 // if set_times is not set, caller is responsible for frame1time, frame2time, csqcmodel_lerpfractime!
-void CSQCModel_InterpolateAnimation_2To4_Note(float sf, float set_times);
-void CSQCModel_InterpolateAnimation_1To2_Note(float sf, float set_times);
+void CSQCModel_InterpolateAnimation_2To4_Note(int sf, float set_times);
+void CSQCModel_InterpolateAnimation_1To2_Note(int sf, float set_times);
 // to retrieve animation state, call this
 void CSQCModel_InterpolateAnimation_2To4_Do();
 void CSQCModel_InterpolateAnimation_1To2_Do();
index 425c985ad6926cb6a060f30e924ec33964e79ddf..32c8b870755997168cc9c7a708bcf9ac15f75923 100644 (file)
@@ -36,7 +36,7 @@
 
 // generic CSQC model code
 
-float CSQCModel_Send(entity to, int sf)
+bool CSQCModel_Send(entity to, int sf)
 {
        // some nice flags for CSQCMODEL_IF
        float isplayer = (IS_CLIENT(self));
index 178b12b9a047ea3645cb89ca8fa09326ddb692f2..478a2063ff74f71c7921d505134e0a1578ca500c 100644 (file)
@@ -10,7 +10,7 @@ CLASS(ListBox) EXTENDS(Item)
        METHOD(ListBox, focusLeave, void(entity))
        ATTRIB(ListBox, focusable, float, 1)
        ATTRIB(ListBox, allowFocusSound, float, 1)
-       ATTRIB(ListBox, selectedItem, float, 0)
+       ATTRIB(ListBox, selectedItem, int, 0)
        ATTRIB(ListBox, size, vector, '0 0 0')
        ATTRIB(ListBox, origin, vector, '0 0 0')
        ATTRIB(ListBox, scrollPos, float, 0) // measured in window heights, fixed when needed
index 59d8c10db59f6053009f51b90bd39a7c2561c645..93d4090e02f762e3c2269683e795fb4ba716204b 100644 (file)
@@ -12,12 +12,12 @@ CLASS(TextSlider) EXTENDS(Slider)
        METHOD(TextSlider, configureTextSliderValues, void(entity, string))
        ATTRIBARRAY(TextSlider, valueStrings, string, 256)
        ATTRIBARRAY(TextSlider, valueIdentifiers, string, 256)
-       ATTRIB(TextSlider, nValues, float, 0)
+       ATTRIB(TextSlider, nValues, int, 0)
 ENDCLASS(TextSlider)
 #endif
 
 #ifdef IMPLEMENTATION
-string TextSlider_valueToIdentifier(entity me, float val)
+string TextSlider_valueToIdentifier(entity me, int val)
 {
        if(val >= me.nValues)
                return "custom";
@@ -25,7 +25,7 @@ string TextSlider_valueToIdentifier(entity me, float val)
                return "custom";
        return me.(valueIdentifiers[val]);
 }
-string TextSlider_valueToText(entity me, float val)
+string TextSlider_valueToText(entity me, int val)
 {
        if(val >= me.nValues)
                return _("Custom");
@@ -35,7 +35,7 @@ string TextSlider_valueToText(entity me, float val)
 }
 void TextSlider_setValueFromIdentifier(entity me, string id)
 {
-       float i;
+       int i;
        for(i = 0; i < me.nValues; ++i)
                if(me.valueToIdentifier(me, i) == id)
                {
@@ -58,9 +58,9 @@ void TextSlider_addValue(entity me, string theString, string theIdentifier)
        me.(valueIdentifiers[me.nValues]) = theIdentifier;
        me.nValues += 1;
 }
-void TextSlider_insertValue(entity me, float pos, string theString, string theIdentifier)
+void TextSlider_insertValue(entity me, int pos, string theString, string theIdentifier)
 {
-       float i;
+       int i;
        for (i = me.nValues; i > pos; --i)
        {
                me.(valueStrings[i]) = me.(valueStrings[i-1]);
index e348796a0f89747b89e16fa315684d4ae0edddc7..a2c2c941320c1ff6dbb2bc80cc024b64b34c05fb 100644 (file)
@@ -960,7 +960,10 @@ void m_setpointerfocus(entity wnd)
                        menuMousePos = focus.origin + 0.5 * focus.size;
                        menuMousePos.x *= 1 / conwidth;
                        menuMousePos.y *= 1 / conheight;
-                       if(wnd.focused) // why does this never happen?
+                       entity par = wnd.parent;
+                       if(par.focused)
+                               par.setFocus(par, wnd);
+                       if(wnd.focused)
                                m_focus_item_chain(wnd, focus);
                }
        }
index 885c89183cf548543cf7af27a2479ff355c60e08..16967a688f8b915d047bd0ec6846ab087bb83fde 100644 (file)
@@ -50,8 +50,9 @@ string campaign_longdesc_wrapped[CAMPAIGN_MAX_ENTRIES];
 
 void rewrapCampaign(float w, float l0, float emptyheight, vector theFontSize)
 {
-       float i, j;
-       float n, l;
+       int i, j;
+       int n;
+       float l;
        string r, s;
        for(i = 0; i < campaign_entries; ++i)
        {
@@ -236,7 +237,7 @@ void XonoticCampaignList_doubleClickListBoxItem(entity me, float i, vector where
 {
        CampaignList_LoadMap(me, me);
 }
-void XonoticCampaignList_drawListBoxItem(entity me, float i, vector absSize, float isSelected)
+void XonoticCampaignList_drawListBoxItem(entity me, int i, vector absSize, bool isSelected)
 {
        string s;
        vector theColor;
index 4e76cbc6d3a5095560d41dd71da3bbb969476678..d49cd3765ca5957a5f35ed17364ddc74fe2d63ad 100644 (file)
@@ -33,7 +33,7 @@ void GameType_ConfigureSliders(entity e, entity l, string pLabel, float pMin, fl
                e.configureXonoticTextSlider(e, pCvar);
 
                // clear old values
-               float i;
+               int i;
                for(i = 0; i <= e.nValues; ++i);
                {
                        if(e.(valueStrings[i])) { strunzone(e.(valueStrings[i])); }
index 9baf36127dfe56648994b79735a84a5c124a06a3..90cbcac0dbbd40910e6203702ff8ed825252a029 100644 (file)
@@ -26,7 +26,7 @@ ENDCLASS(XonoticMapInfoDialog)
 #endif
 
 #ifdef IMPLEMENTATION
-void XonoticMapInfoDialog_loadMapInfo(entity me, float i, entity mlb)
+void XonoticMapInfoDialog_loadMapInfo(entity me, int i, entity mlb)
 {
        me.currentMapIndex = i;
        me.startButton.onClickEntity = mlb;
@@ -67,7 +67,8 @@ void XonoticMapInfoDialog_loadMapInfo(entity me, float i, entity mlb)
 void XonoticMapInfoDialog_fill(entity me)
 {
        entity e;
-       float w, wgt, i, n;
+       int i;
+       float w, wgt, n;
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, me.rows - 2, 3, e = makeXonoticImage(string_null, 4.0/3.0));
index a083207715250430fc1a9dd465b66c8c68dca477..5c2b898f21acdd93e4d9eaa5d8d33753fd6dc001 100644 (file)
@@ -1,7 +1,7 @@
 #ifdef INTERFACE
 CLASS(XonoticKeyBinder) EXTENDS(XonoticListBox)
        METHOD(XonoticKeyBinder, configureXonoticKeyBinder, void(entity))
-       ATTRIB(XonoticKeyBinder, rowsPerItem, float, 1)
+       ATTRIB(XonoticKeyBinder, rowsPerItem, int, 1)
        METHOD(XonoticKeyBinder, drawListBoxItem, void(entity, float, vector, float))
        METHOD(XonoticKeyBinder, doubleClickListBoxItem, void(entity, float, vector))
        METHOD(XonoticKeyBinder, resizeNotify, void(entity, vector, vector, vector, vector))
@@ -16,7 +16,7 @@ CLASS(XonoticKeyBinder) EXTENDS(XonoticListBox)
        ATTRIB(XonoticKeyBinder, columnKeysOrigin, float, 0)
        ATTRIB(XonoticKeyBinder, columnKeysSize, float, 0)
 
-       ATTRIB(XonoticKeyBinder, previouslySelected, float, -1)
+       ATTRIB(XonoticKeyBinder, previouslySelected, int, -1)
        ATTRIB(XonoticKeyBinder, inMouseHandler, float, 0)
        ATTRIB(XonoticKeyBinder, userbindEditButton, entity, NULL)
        ATTRIB(XonoticKeyBinder, keyGrabButton, entity, NULL)
@@ -34,15 +34,15 @@ void KeyBinder_Bind_Edit(entity btn, entity me);
 
 const string KEY_NOT_BOUND_CMD = "// not bound";
 
-const float MAX_KEYS_PER_FUNCTION = 2;
-const float MAX_KEYBINDS = 256;
+const int MAX_KEYS_PER_FUNCTION = 2;
+const int MAX_KEYBINDS = 256;
 string Xonotic_KeyBinds_Functions[MAX_KEYBINDS];
 string Xonotic_KeyBinds_Descriptions[MAX_KEYBINDS];
-float Xonotic_KeyBinds_Count = -1;
+int Xonotic_KeyBinds_Count = -1;
 
 void Xonotic_KeyBinds_Read()
 {
-       float fh;
+       int fh;
        string s;
 
        Xonotic_KeyBinds_Count = 0;
@@ -71,7 +71,8 @@ entity makeXonoticKeyBinder()
 }
 void replace_bind(string from, string to)
 {
-       float n, j, k;
+       int n, j;
+       float k; // not sure if float or int
        n = tokenize(findkeysforcommand(from, 0)); // uses '...' strings
        for(j = 0; j < n; ++j)
        {
@@ -130,9 +131,10 @@ void KeyBinder_Bind_Change(entity btn, entity me)
        me.clearButton.disabled = 1;
        keyGrabber = me;
 }
-void XonoticKeyBinder_keyGrabbed(entity me, float key, float ascii)
+void XonoticKeyBinder_keyGrabbed(entity me, int key, bool ascii)
 {
-       float n, j, k, nvalid;
+       int n, j, nvalid;
+       float k;
        string func;
 
        me.keyGrabButton.forcePressed = 0;
@@ -249,7 +251,7 @@ void XonoticKeyBinder_doubleClickListBoxItem(entity me, float i, vector where)
 {
        KeyBinder_Bind_Change(NULL, me);
 }
-void XonoticKeyBinder_setSelected(entity me, float i)
+void XonoticKeyBinder_setSelected(entity me, int i)
 {
        // handling of "unselectable" items
        i = floor(0.5 + bound(0, i, me.nItems - 1));
@@ -276,10 +278,9 @@ void XonoticKeyBinder_setSelected(entity me, float i)
                me.userbindEditButton.disabled = (substring(Xonotic_KeyBinds_Descriptions[i], 0, 1) != "$");
        SUPER(XonoticKeyBinder).setSelected(me, i);
 }
-float XonoticKeyBinder_keyDown(entity me, float key, float ascii, float shift)
+float XonoticKeyBinder_keyDown(entity me, int key, bool ascii, float shift)
 {
-       float r;
-       r = 1;
+       bool r = true;
        switch(key)
        {
                case K_ENTER:
@@ -298,10 +299,11 @@ float XonoticKeyBinder_keyDown(entity me, float key, float ascii, float shift)
        }
        return r;
 }
-void XonoticKeyBinder_drawListBoxItem(entity me, float i, vector absSize, float isSelected)
+void XonoticKeyBinder_drawListBoxItem(entity me, int i, vector absSize, bool isSelected)
 {
        string s;
-       float j, k, n;
+       int j, n;
+       float k;
        vector theColor;
        float theAlpha;
        string func, descr;
index c6c53cc8e01f4afa88df9f5ac838840b7ed1120c..29877c5d5e888a8c16a9469ab480580176e018a2 100644 (file)
@@ -126,10 +126,10 @@ void ServerList_Info_Click(entity btn, entity me);
 void ServerList_Update_favoriteButton(entity btn, entity me);
 
 // fields for category entities
-const float MAX_CATEGORIES = 9;
-const float CATEGORY_FIRST = 1;
+const int MAX_CATEGORIES = 9;
+const int CATEGORY_FIRST = 1;
 entity categories[MAX_CATEGORIES];
-float category_ent_count;
+int category_ent_count;
 .string cat_name;
 .string cat_string;
 .string cat_enoverride_string;
@@ -138,9 +138,9 @@ float category_ent_count;
 .float cat_dioverride;
 
 // fields for drawing categories
-float category_name[MAX_CATEGORIES];
-float category_item[MAX_CATEGORIES];
-float category_draw_count;
+int category_name[MAX_CATEGORIES];
+int category_item[MAX_CATEGORIES];
+int category_draw_count;
 
 #define SLIST_CATEGORIES \
        SLIST_CATEGORY(CAT_FAVORITED,    "",            "",             ZCTX(_("SLCAT^Favorites"))) \
@@ -155,7 +155,7 @@ float category_draw_count;
 
 #define SLIST_CATEGORY_AUTOCVAR(name) autocvar_menu_slist_categories_##name##_override
 #define SLIST_CATEGORY(name,enoverride,dioverride,str) \
-       float name; \
+       int name; \
        string SLIST_CATEGORY_AUTOCVAR(name) = enoverride;
 SLIST_CATEGORIES
 #undef SLIST_CATEGORY
@@ -180,7 +180,7 @@ void RegisterSLCategories()
        SLIST_CATEGORIES
        #undef SLIST_CATEGORY
 
-       float i, x, catnum;
+       int i, x, catnum;
        string s;
 
        #define PROCESS_OVERRIDE(override_string,override_field) \
@@ -219,7 +219,7 @@ void RegisterSLCategories()
 }
 
 // Supporting Functions
-entity RetrieveCategoryEnt(float catnum)
+entity RetrieveCategoryEnt(int catnum)
 {
        if((catnum > 0) && (catnum <= category_ent_count))
        {
@@ -232,10 +232,10 @@ entity RetrieveCategoryEnt(float catnum)
        }
 }
 
-float IsServerInList(string list, string srv)
+bool IsServerInList(string list, string srv)
 {
        string p;
-       float i, n;
+       int i, n;
        if(srv == "")
                return false;
        srv = netaddress_resolve(srv, 26000);
@@ -260,12 +260,12 @@ float IsServerInList(string list, string srv)
        return false;
 }
 
-float CheckCategoryOverride(float cat)
+int CheckCategoryOverride(int cat)
 {
        entity catent = RetrieveCategoryEnt(cat);
        if(catent)
        {
-               float override = (autocvar_menu_slist_categories ? catent.cat_enoverride : catent.cat_dioverride);
+               int override = (autocvar_menu_slist_categories ? catent.cat_enoverride : catent.cat_dioverride);
                if(override) { return override; }
                else { return cat; }
        }
@@ -276,10 +276,10 @@ float CheckCategoryOverride(float cat)
        }
 }
 
-float CheckCategoryForEntry(float entry)
+int CheckCategoryForEntry(int entry)
 {
        string s, k, v, modtype = "";
-       float j, m, impure = 0, freeslots = 0, sflags = 0;
+       int j, m, impure = 0, freeslots = 0, sflags = 0;
        s = gethostcachestring(SLIST_FIELD_QCSTATUS, entry);
        m = tokenizebyseparator(s, ":");
 
@@ -381,12 +381,12 @@ float CheckCategoryForEntry(float entry)
 void XonoticServerList_toggleFavorite(entity me, string srv)
 {
        string s, s0, s1, s2, srv_resolved, p;
-       float i, n, f;
+       int i, n;
+       bool f = false;
        srv_resolved = netaddress_resolve(srv, 26000);
        p = crypto_getidfp(srv_resolved);
        s = cvar_string("net_slist_favorites");
        n = tokenize_console(s);
-       f = 0;
        for(i = 0; i < n; ++i)
        {
                if(substring(argv(i), 0, 1) != "[" && strlen(argv(i)) == 44 && strstrofs(argv(i), ".", 0) < 0)
@@ -410,7 +410,7 @@ void XonoticServerList_toggleFavorite(entity me, string srv)
                cvar_set("net_slist_favorites", strcat(s0, s1, s2));
                s = cvar_string("net_slist_favorites");
                n = tokenize_console(s);
-               f = 1;
+               f = true;
                --i;
        }
 
@@ -456,10 +456,9 @@ void XonoticServerList_configureXonoticServerList(entity me)
        // clear list
        me.nItems = 0;
 }
-void XonoticServerList_setSelected(entity me, float i)
+void XonoticServerList_setSelected(entity me, int i)
 {
-       float save;
-       save = me.selectedItem;
+       //int save = me.selectedItem;
        SUPER(XonoticServerList).setSelected(me, i);
        /*
        if(me.selectedItem == save)
@@ -478,14 +477,15 @@ void XonoticServerList_setSelected(entity me, float i)
        me.ipAddressBox.cursorPos = strlen(me.selectedServer);
        me.ipAddressBoxFocused = -1;
 }
-void XonoticServerList_refreshServerList(entity me, float mode)
+void XonoticServerList_refreshServerList(entity me, int mode)
 {
        //print("refresh of type ", ftos(mode), "\n");
 
        if(mode >= REFRESHSERVERLIST_REFILTER)
        {
-               float m, i, n;
-               float listflags = 0;
+               float m;
+               int i, n;
+               int listflags = 0;
                string s, typestr, modstr;
 
                s = me.filterString;
@@ -573,7 +573,8 @@ void XonoticServerList_focusEnter(entity me)
 
 void XonoticServerList_draw(entity me)
 {
-       float i, found, owned;
+       int i;
+       bool found = false, owned;
 
        if(_Nex_ExtResponseSystem_BannedServersNeedsRefresh)
        {
@@ -714,7 +715,6 @@ void XonoticServerList_draw(entity me)
        me.infoButton.disabled = ((me.nItems == 0) || !owned);
        me.favoriteButton.disabled = ((me.nItems == 0) && (me.ipAddressBox.text == ""));
 
-       found = 0;
        if(me.selectedServer)
        {
                for(i = 0; i < me.nItems; ++i)
@@ -722,7 +722,7 @@ void XonoticServerList_draw(entity me)
                        if(gethostcachestring(SLIST_FIELD_CNAME, i) == me.selectedServer)
                        {
                                me.selectedItem = i;
-                               found = 1;
+                               found = true;
                                break;
                        }
                }
@@ -861,7 +861,7 @@ void ServerList_ShowFull_Click(entity box, entity me)
        me.ipAddressBox.cursorPos = 0;
        me.ipAddressBoxFocused = -1;
 }
-void XonoticServerList_setSortOrder(entity me, float fld, float direction)
+void XonoticServerList_setSortOrder(entity me, int fld, int direction)
 {
        if(me.currentSortField == fld)
                direction = -me.currentSortOrder;
@@ -922,8 +922,7 @@ void XonoticServerList_resizeNotify(entity me, vector relOrigin, vector relSize,
        me.positionSortButton(me, me.sortButton4, me.columnTypeOrigin, me.columnTypeSize, _("Type"), ServerList_TypeSort_Click);
        me.positionSortButton(me, me.sortButton5, me.columnPlayersOrigin, me.columnPlayersSize, _("Players"), ServerList_PlayerSort_Click);
 
-       float f;
-       f = me.currentSortField;
+       int f = me.currentSortField;
        if(f >= 0)
        {
                me.currentSortField = -1;
@@ -958,18 +957,20 @@ void ServerList_Info_Click(entity btn, entity me)
        vector sz = boxToGlobalSize(eY * me.itemHeight + eX * (1 - me.controlWidth), me.size);
        DialogOpenButton_Click_withCoords(me, main.serverInfoDialog, org, sz);
 }
-void XonoticServerList_doubleClickListBoxItem(entity me, float i, vector where)
+void XonoticServerList_doubleClickListBoxItem(entity me, int i, vector where)
 {
        ServerList_Connect_Click(NULL, me);
 }
-void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float isSelected)
+void XonoticServerList_drawListBoxItem(entity me, int i, vector absSize, bool isSelected)
 {
        // layout: Ping, Server name, Map name, NP, TP, MP
-       float p, q;
-       float isv4, isv6;
+       float p;
+       int q;
+       bool isv4, isv6;
        vector theColor;
        float theAlpha;
-       float m, pure, freeslots, j, sflags;
+       bool pure = false;
+       int freeslots = -1, sflags = -1, j, m;
        string s, typestr, versionstr, k, v, modname;
 
        //printf("time: %f, i: %d, item: %d, nitems: %d\n", time, i, item, me.nItems);
@@ -1026,9 +1027,7 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float
                versionstr = argv(1);
        }
        freeslots = -1;
-       sflags = -1;
        modname = "";
-       pure = 0;
        for(j = 2; j < m; ++j)
        {
                if(argv(j) == "")
@@ -1036,11 +1035,11 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float
                k = substring(argv(j), 0, 1);
                v = substring(argv(j), 1, -1);
                if(k == "P")
-                       pure = stof(v);
+                       pure = stob(v);
                else if(k == "S")
                        freeslots = stof(v);
                else if(k == "F")
-                       sflags = stof(v);
+                       sflags = stoi(v);
                else if(k == "M")
                        modname = v;
        }
@@ -1064,7 +1063,7 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float
        if(modname != "CTS")
        if(modname != "NIX")
        if(modname != "NewToys")
-               pure = 0;
+               pure = false;
 
        if(gethostcachenumber(SLIST_FIELD_FREESLOTS, i) <= 0)
                theAlpha = SKINALPHA_SERVERLIST_FULL;
@@ -1076,9 +1075,9 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float
                theAlpha = 1;
 
        p = gethostcachenumber(SLIST_FIELD_PING, i);
-       const float PING_LOW = 75;
-       const float PING_MED = 200;
-       const float PING_HIGH = 500;
+       const int PING_LOW = 75;
+       const int PING_MED = 200;
+       const int PING_HIGH = 500;
        if(p < PING_LOW)
                theColor = SKINCOLOR_SERVERLIST_LOWPING + (SKINCOLOR_SERVERLIST_MEDPING - SKINCOLOR_SERVERLIST_LOWPING) * (p / PING_LOW);
        else if(p < PING_MED)
@@ -1102,15 +1101,15 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float
 
        s = gethostcachestring(SLIST_FIELD_CNAME, i);
 
-       isv4 = isv6 = 0;
+       isv4 = isv6 = false;
        if(substring(s, 0, 1) == "[")
        {
-               isv6 = 1;
+               isv6 = true;
                me.seenIPv6 += 1;
        }
        else if(strstrofs("0123456789", substring(s, 0, 1), 0) >= 0)
        {
-               isv4 = 1;
+               isv4 = true;
                me.seenIPv4 += 1;
        }
 
@@ -1231,7 +1230,7 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float
        draw_Text(me.realUpperMargin * eY + (me.columnPlayersOrigin + (me.columnPlayersSize - draw_TextWidth(s, 0, me.realFontSize)) * 0.5) * eX, s, me.realFontSize, theColor, theAlpha, 0);
 }
 
-float XonoticServerList_keyDown(entity me, float scan, float ascii, float shift)
+bool XonoticServerList_keyDown(entity me, int scan, bool ascii, bool shift)
 {
        vector org, sz;
 
@@ -1241,7 +1240,7 @@ float XonoticServerList_keyDown(entity me, float scan, float ascii, float shift)
        if(scan == K_ENTER || scan == K_KP_ENTER)
        {
                ServerList_Connect_Click(NULL, me);
-               return 1;
+               return true;
        }
        else if(scan == K_MOUSE2 || scan == K_SPACE)
        {
@@ -1250,9 +1249,9 @@ float XonoticServerList_keyDown(entity me, float scan, float ascii, float shift)
                        m_play_click_sound(MENU_SOUND_OPEN);
                        main.serverInfoDialog.loadServerInfo(main.serverInfoDialog, me.selectedItem);
                        DialogOpenButton_Click_withCoords(me, main.serverInfoDialog, org, sz);
-                       return 1;
+                       return true;
                }
-               return 0;
+               return false;
        }
        else if(scan == K_INS || scan == K_MOUSE3 || scan == K_KP_INS)
        {
@@ -1260,28 +1259,30 @@ float XonoticServerList_keyDown(entity me, float scan, float ascii, float shift)
                {
                        me.toggleFavorite(me, me.selectedServer);
                        me.ipAddressBoxFocused = -1;
-                       return 1;
+                       return true;
                }
-               return 0;
+               return false;
        }
        else if(SUPER(XonoticServerList).keyDown(me, scan, ascii, shift))
-               return 1;
+               return true;
        else if(!me.controlledTextbox)
-               return 0;
+               return false;
        else
                return me.controlledTextbox.keyDown(me.controlledTextbox, scan, ascii, shift);
 }
 
-float XonoticServerList_getTotalHeight(entity me) {
+float XonoticServerList_getTotalHeight(entity me)
+{
        float num_normal_rows = me.nItems;
-       float num_headers = category_draw_count;
+       int num_headers = category_draw_count;
        return me.itemHeight * (num_normal_rows + me.categoriesHeight * num_headers);
 }
-float XonoticServerList_getItemAtPos(entity me, float pos) {
+int XonoticServerList_getItemAtPos(entity me, float pos)
+{
        pos = pos / me.itemHeight;
-       float i;
+       int i;
        for (i = category_draw_count - 1; i >= 0; --i) {
-               float itemidx = category_item[i];
+               int itemidx = category_item[i];
                float itempos = i * me.categoriesHeight + category_item[i];
                if (pos >= itempos + me.categoriesHeight + 1)
                        return itemidx + 1 + floor(pos - (itempos + me.categoriesHeight + 1));
@@ -1291,10 +1292,11 @@ float XonoticServerList_getItemAtPos(entity me, float pos) {
        // No category matches? Note that category 0 is... 0. Therefore no headings exist at all.
        return floor(pos);
 }
-float XonoticServerList_getItemStart(entity me, float item) {
-       float i;
+float XonoticServerList_getItemStart(entity me, int item)
+{
+       int i;
        for (i = category_draw_count - 1; i >= 0; --i) {
-               float itemidx = category_item[i];
+               int itemidx = category_item[i];
                float itempos = i * me.categoriesHeight + category_item[i];
                if (item >= itemidx + 1)
                        return (itempos + me.categoriesHeight + 1 + item - (itemidx + 1)) * me.itemHeight;
@@ -1304,8 +1306,9 @@ float XonoticServerList_getItemStart(entity me, float item) {
        // No category matches? Note that category 0 is... 0. Therefore no headings exist at all.
        return item * me.itemHeight;
 }
-float XonoticServerList_getItemHeight(entity me, float item) {
-       float i;
+float XonoticServerList_getItemHeight(entity me, int item)
+{
+       int i;
        for (i = 0; i < category_draw_count; ++i) {
                // Matches exactly the headings with increased height.
                if (item == category_item[i])
index 1d3b897fc055664f9ed1a3cf98765ed8ae9ad4ee..46d4e273f089004d503c074149e39d7da1f9e222 100644 (file)
@@ -65,9 +65,8 @@ void XonoticWeaponsList_resizeNotify(entity me, vector relOrigin, vector relSize
 }
 float XonoticWeaponsList_mouseDrag(entity me, vector pos)
 {
-       float f, i;
-       i = me.selectedItem;
-       f = SUPER(XonoticWeaponsList).mouseDrag(me, pos);
+       int i = me.selectedItem;
+       float f = SUPER(XonoticWeaponsList).mouseDrag(me, pos);
 
        if(me.pressed != 1) // don't change priority if the person is just scrolling
        {
index 8fd5acfdc584ed94ba74fcf9c154b61840918d71..65595a0f15a554687c4c9fa5d36d732fd2475e1e 100644 (file)
@@ -128,12 +128,12 @@ float autocvar_g_balance_keyhunt_delay_tracking;
 float autocvar_g_balance_keyhunt_dropvelocity;
 float autocvar_g_balance_keyhunt_maxdist;
 float autocvar_g_balance_keyhunt_protecttime;
-float autocvar_g_balance_keyhunt_score_capture;
-float autocvar_g_balance_keyhunt_score_carrierfrag;
-float autocvar_g_balance_keyhunt_score_collect;
-float autocvar_g_balance_keyhunt_score_destroyed;
-float autocvar_g_balance_keyhunt_score_destroyed_ownfactor;
-float autocvar_g_balance_keyhunt_score_push;
+int autocvar_g_balance_keyhunt_score_capture;
+int autocvar_g_balance_keyhunt_score_carrierfrag;
+int autocvar_g_balance_keyhunt_score_collect;
+int autocvar_g_balance_keyhunt_score_destroyed;
+int autocvar_g_balance_keyhunt_score_destroyed_ownfactor;
+int autocvar_g_balance_keyhunt_score_push;
 float autocvar_g_balance_keyhunt_throwvelocity;
 float autocvar_g_balance_kill_delay;
 float autocvar_g_balance_kill_antispam;
@@ -145,18 +145,18 @@ float autocvar_g_balance_nexball_secondary_force;
 float autocvar_g_balance_nexball_secondary_lifetime;
 float autocvar_g_balance_nexball_secondary_refire;
 float autocvar_g_balance_nexball_secondary_speed;
-float autocvar_g_balance_nix_ammo_cells;
-float autocvar_g_balance_nix_ammo_plasma;
-float autocvar_g_balance_nix_ammo_fuel;
-float autocvar_g_balance_nix_ammo_nails;
-float autocvar_g_balance_nix_ammo_rockets;
-float autocvar_g_balance_nix_ammo_shells;
-float autocvar_g_balance_nix_ammoincr_cells;
-float autocvar_g_balance_nix_ammoincr_plasma;
-float autocvar_g_balance_nix_ammoincr_fuel;
-float autocvar_g_balance_nix_ammoincr_nails;
-float autocvar_g_balance_nix_ammoincr_rockets;
-float autocvar_g_balance_nix_ammoincr_shells;
+int autocvar_g_balance_nix_ammo_cells;
+int autocvar_g_balance_nix_ammo_plasma;
+int autocvar_g_balance_nix_ammo_fuel;
+int autocvar_g_balance_nix_ammo_nails;
+int autocvar_g_balance_nix_ammo_rockets;
+int autocvar_g_balance_nix_ammo_shells;
+int autocvar_g_balance_nix_ammoincr_cells;
+int autocvar_g_balance_nix_ammoincr_plasma;
+int autocvar_g_balance_nix_ammoincr_fuel;
+int autocvar_g_balance_nix_ammoincr_nails;
+int autocvar_g_balance_nix_ammoincr_rockets;
+int autocvar_g_balance_nix_ammoincr_shells;
 float autocvar_g_balance_nix_incrtime;
 float autocvar_g_balance_nix_roundtime;
 float autocvar_g_balance_pause_armor_rot;
@@ -179,8 +179,8 @@ float autocvar_g_balance_powerup_strength_selfforce;
 float autocvar_g_balance_powerup_strength_time;
 float autocvar_g_balance_superweapons_time;
 float autocvar_g_balance_selfdamagepercent;
-float autocvar_g_balance_teams;
-float autocvar_g_balance_teams_prevent_imbalance;
+bool autocvar_g_balance_teams;
+bool autocvar_g_balance_teams_prevent_imbalance;
 float autocvar_g_balance_teams_scorefactor;
 float autocvar_g_ballistics_density_corpse;
 float autocvar_g_ballistics_density_player;
@@ -190,40 +190,40 @@ float autocvar_g_ban_default_masksize;
 float autocvar_g_ban_sync_interval;
 float autocvar_g_ban_sync_timeout;
 string autocvar_g_ban_sync_trusted_servers;
-float autocvar_g_ban_sync_trusted_servers_verify;
+bool autocvar_g_ban_sync_trusted_servers_verify;
 string autocvar_g_ban_sync_uri;
 string autocvar_g_banned_list;
-float autocvar_g_banned_list_idmode;
-float autocvar_g_bastet;
-float autocvar_g_botclip_collisions;
-float autocvar_g_bugrigs;
+bool autocvar_g_banned_list_idmode;
+bool autocvar_g_bastet;
+bool autocvar_g_botclip_collisions;
+bool autocvar_g_bugrigs;
 float autocvar_g_ca_damage2score_multiplier;
-float autocvar_g_ca_point_leadlimit;
-float autocvar_g_ca_point_limit;
+int autocvar_g_ca_point_leadlimit;
+int autocvar_g_ca_point_limit;
 float autocvar_g_ca_round_timelimit;
-float autocvar_g_ca_spectate_enemies;
-float autocvar_g_ca_teams;
-float autocvar_g_ca_teams_override;
-float autocvar_g_ca_team_spawns;
+bool autocvar_g_ca_spectate_enemies;
+int autocvar_g_ca_teams;
+int autocvar_g_ca_teams_override;
+bool autocvar_g_ca_team_spawns;
 float autocvar_g_ca_warmup;
-float autocvar_g_campaign;
+bool autocvar_g_campaign;
 #define autocvar_g_campaign_forceteam cvar("g_campaign_forceteam")
-float autocvar_g_campaign_skill;
-float autocvar_g_casings;
-float autocvar_g_changeteam_banned;
+int autocvar_g_campaign_skill;
+int autocvar_g_casings;
+bool autocvar_g_changeteam_banned;
 float autocvar_g_chat_flood_burst;
 float autocvar_g_chat_flood_burst_team;
 float autocvar_g_chat_flood_burst_tell;
 float autocvar_g_chat_flood_lmax;
 float autocvar_g_chat_flood_lmax_team;
 float autocvar_g_chat_flood_lmax_tell;
-float autocvar_g_chat_flood_notify_flooder;
+bool autocvar_g_chat_flood_notify_flooder;
 float autocvar_g_chat_flood_spl;
 float autocvar_g_chat_flood_spl_team;
 float autocvar_g_chat_flood_spl_tell;
-float autocvar_g_chat_nospectators;
-float autocvar_g_chat_teamcolors;
-float autocvar_g_chat_tellprivacy;
+int autocvar_g_chat_nospectators;
+bool autocvar_g_chat_teamcolors;
+bool autocvar_g_chat_tellprivacy;
 bool autocvar_g_ctf_allow_vehicle_carry;
 bool autocvar_g_ctf_allow_vehicle_touch;
 bool autocvar_g_ctf_allow_monster_touch;
@@ -239,7 +239,7 @@ float autocvar_g_ctf_throw_velocity_up;
 float autocvar_g_ctf_drop_velocity_up;
 float autocvar_g_ctf_drop_velocity_side;
 bool autocvar_g_ctf_oneflag_reverse;
-float autocvar_g_ctf_portalteleport;
+bool autocvar_g_ctf_portalteleport;
 bool autocvar_g_ctf_pass;
 float autocvar_g_ctf_pass_arc;
 float autocvar_g_ctf_pass_arc_max;
@@ -247,7 +247,7 @@ float autocvar_g_ctf_pass_directional_max;
 float autocvar_g_ctf_pass_directional_min;
 float autocvar_g_ctf_pass_radius;
 float autocvar_g_ctf_pass_wait;
-float autocvar_g_ctf_pass_request;
+bool autocvar_g_ctf_pass_request;
 float autocvar_g_ctf_pass_turnrate;
 float autocvar_g_ctf_pass_timelimit;
 float autocvar_g_ctf_pass_velocity;
@@ -261,7 +261,7 @@ int autocvar_g_ctf_flag_health;
 bool autocvar_g_ctf_flag_return;
 float autocvar_g_ctf_flag_return_carried_radius;
 float autocvar_g_ctf_flag_return_time;
-float autocvar_g_ctf_flag_return_when_unreachable;
+bool autocvar_g_ctf_flag_return_when_unreachable;
 float autocvar_g_ctf_flag_return_damage;
 float autocvar_g_ctf_flag_return_damage_delay;
 float autocvar_g_ctf_flag_return_dropped;
@@ -278,7 +278,6 @@ int autocvar_g_ctf_score_capture;
 int autocvar_g_ctf_score_capture_assist;
 int autocvar_g_ctf_score_kill;
 int autocvar_g_ctf_score_penalty_drop;
-//float autocvar_g_ctf_score_penalty_suicidedrop;
 int autocvar_g_ctf_score_penalty_returned;
 int autocvar_g_ctf_score_pickup_base;
 int autocvar_g_ctf_score_pickup_dropped_early;
@@ -286,7 +285,7 @@ int autocvar_g_ctf_score_pickup_dropped_late;
 int autocvar_g_ctf_score_return;
 float autocvar_g_ctf_shield_force;
 float autocvar_g_ctf_shield_max_ratio;
-float autocvar_g_ctf_shield_min_negscore;
+int autocvar_g_ctf_shield_min_negscore;
 bool autocvar_g_ctf_stalemate;
 int autocvar_g_ctf_stalemate_endcondition;
 float autocvar_g_ctf_stalemate_time;
@@ -294,60 +293,60 @@ bool autocvar_g_ctf_reverse;
 float autocvar_g_ctf_dropped_capture_delay;
 float autocvar_g_ctf_dropped_capture_radius;
 float autocvar_g_cts_finish_kill_delay;
-float autocvar_g_cts_selfdamage;
-float autocvar_g_debug_bot_commands;
-float autocvar_g_domination_default_teams;
-float autocvar_g_domination_disable_frags;
-float autocvar_g_domination_point_amt;
-float autocvar_g_domination_point_fullbright;
-float autocvar_g_domination_point_leadlimit;
-float autocvar_g_domination_roundbased;
-float autocvar_g_domination_roundbased_point_limit;
+bool autocvar_g_cts_selfdamage;
+bool autocvar_g_debug_bot_commands;
+int autocvar_g_domination_default_teams;
+bool autocvar_g_domination_disable_frags;
+int autocvar_g_domination_point_amt;
+bool autocvar_g_domination_point_fullbright;
+int autocvar_g_domination_point_leadlimit;
+bool autocvar_g_domination_roundbased;
+int autocvar_g_domination_roundbased_point_limit;
 float autocvar_g_domination_round_timelimit;
 float autocvar_g_domination_warmup;
 #define autocvar_g_domination_point_limit cvar("g_domination_point_limit")
 float autocvar_g_domination_point_rate;
-float autocvar_g_domination_teams_override;
-float autocvar_g_forced_respawn;
+int autocvar_g_domination_teams_override;
+bool autocvar_g_forced_respawn;
 string autocvar_g_forced_team_blue;
 string autocvar_g_forced_team_otherwise;
 string autocvar_g_forced_team_pink;
 string autocvar_g_forced_team_red;
 string autocvar_g_forced_team_yellow;
-float autocvar_g_freezetag_frozen_damage_trigger;
+bool autocvar_g_freezetag_frozen_damage_trigger;
 float autocvar_g_freezetag_frozen_force;
 float autocvar_g_freezetag_frozen_maxtime;
 float autocvar_g_freezetag_revive_falldamage;
 float autocvar_g_freezetag_revive_falldamage_health;
-float autocvar_g_freezetag_revive_nade;
+bool autocvar_g_freezetag_revive_nade;
 float autocvar_g_freezetag_revive_nade_health;
-float autocvar_g_freezetag_point_leadlimit;
-float autocvar_g_freezetag_point_limit;
+int autocvar_g_freezetag_point_leadlimit;
+int autocvar_g_freezetag_point_limit;
 float autocvar_g_freezetag_revive_extra_size;
 float autocvar_g_freezetag_revive_speed;
 float autocvar_g_freezetag_revive_clearspeed;
 float autocvar_g_freezetag_round_timelimit;
-float autocvar_g_freezetag_teams;
-float autocvar_g_freezetag_teams_override;
-float autocvar_g_freezetag_team_spawns;
+int autocvar_g_freezetag_teams;
+int autocvar_g_freezetag_teams_override;
+bool autocvar_g_freezetag_team_spawns;
 float autocvar_g_freezetag_warmup;
 #define autocvar_g_friendlyfire cvar("g_friendlyfire")
 #define autocvar_g_friendlyfire_virtual cvar("g_friendlyfire_virtual")
 #define autocvar_g_friendlyfire_virtual_force cvar("g_friendlyfire_virtual_force")
-float autocvar_g_full_getstatus_responses;
-float autocvar_g_fullbrightitems;
-float autocvar_g_fullbrightplayers;
+bool autocvar_g_full_getstatus_responses;
+bool autocvar_g_fullbrightitems;
+bool autocvar_g_fullbrightplayers;
 #define autocvar_g_grappling_hook cvar("g_grappling_hook")
-float autocvar_g_grappling_hook_tarzan;
-float autocvar_g_hitplots;
+int autocvar_g_grappling_hook_tarzan;
+bool autocvar_g_hitplots;
 string autocvar_g_hitplots_individuals;
 float autocvar_g_jetpack_acceleration_side;
 float autocvar_g_jetpack_acceleration_up;
 float autocvar_g_jetpack_antigravity;
-float autocvar_g_jetpack_fuel;
+int autocvar_g_jetpack_fuel;
 float autocvar_g_jetpack_maxspeed_side;
 float autocvar_g_jetpack_maxspeed_up;
-float autocvar_g_keepaway_ballcarrier_effects;
+int autocvar_g_keepaway_ballcarrier_effects;
 float autocvar_g_keepaway_ballcarrier_damage;
 float autocvar_g_keepaway_ballcarrier_force;
 float autocvar_g_keepaway_ballcarrier_highspeed;
@@ -357,61 +356,61 @@ float autocvar_g_keepaway_noncarrier_damage;
 float autocvar_g_keepaway_noncarrier_force;
 float autocvar_g_keepaway_noncarrier_selfdamage;
 float autocvar_g_keepaway_noncarrier_selfforce;
-float autocvar_g_keepaway_noncarrier_warn;
-float autocvar_g_keepaway_score_bckill;
-float autocvar_g_keepaway_score_killac;
-float autocvar_g_keepaway_score_timepoints;
+bool autocvar_g_keepaway_noncarrier_warn;
+int autocvar_g_keepaway_score_bckill;
+int autocvar_g_keepaway_score_killac;
+int autocvar_g_keepaway_score_timepoints;
 float autocvar_g_keepaway_score_timeinterval;
 float autocvar_g_keepawayball_damageforcescale;
-float autocvar_g_keepawayball_effects;
+int autocvar_g_keepawayball_effects;
 float autocvar_g_keepawayball_respawntime;
-float autocvar_g_keepawayball_trail_color;
-float autocvar_g_keyhunt_point_leadlimit;
+int autocvar_g_keepawayball_trail_color;
+int autocvar_g_keyhunt_point_leadlimit;
 #define autocvar_g_keyhunt_point_limit cvar("g_keyhunt_point_limit")
-float autocvar_g_keyhunt_teams;
-float autocvar_g_keyhunt_teams_override;
-float autocvar_g_lms_extra_lives;
-float autocvar_g_lms_join_anytime;
-float autocvar_g_lms_last_join;
+int autocvar_g_keyhunt_teams;
+int autocvar_g_keyhunt_teams_override;
+int autocvar_g_lms_extra_lives;
+bool autocvar_g_lms_join_anytime;
+int autocvar_g_lms_last_join;
 #define autocvar_g_lms_lives_override cvar("g_lms_lives_override")
-float autocvar_g_lms_regenerate;
+bool autocvar_g_lms_regenerate;
 #define autocvar_g_maplist cvar_string("g_maplist")
-float autocvar_g_maplist_check_waypoints;
-float autocvar_g_maplist_index;
+bool autocvar_g_maplist_check_waypoints;
+int autocvar_g_maplist_index;
 string autocvar_g_maplist_mostrecent;
-float autocvar_g_maplist_mostrecent_count;
-float autocvar_g_maplist_selectrandom;
+int autocvar_g_maplist_mostrecent_count;
+bool autocvar_g_maplist_selectrandom;
 float autocvar_g_maplist_shuffle;
 #define autocvar_g_maplist_votable cvar("g_maplist_votable")
-float autocvar_g_maplist_votable_abstain;
+bool autocvar_g_maplist_votable_abstain;
 float autocvar_g_maplist_votable_keeptwotime;
-float autocvar_g_maplist_votable_nodetail;
+bool autocvar_g_maplist_votable_nodetail;
 string autocvar_g_maplist_votable_screenshot_dir;
-float autocvar_g_maplist_votable_suggestions;
-float autocvar_g_maplist_votable_suggestions_override_mostrecent;
+bool autocvar_g_maplist_votable_suggestions;
+bool autocvar_g_maplist_votable_suggestions_override_mostrecent;
 float autocvar_g_maplist_votable_timeout;
-float autocvar_g_maxplayers;
+int autocvar_g_maxplayers;
 float autocvar_g_maxplayers_spectator_blocktime;
 float autocvar_g_maxpushtime;
 float autocvar_g_maxspeed;
 float autocvar_g_midair_shieldtime;
 #define autocvar_g_instagib cvar("g_instagib")
-float autocvar_g_instagib_ammo_drop;
-float autocvar_g_instagib_extralives;
+int autocvar_g_instagib_ammo_drop;
+int autocvar_g_instagib_extralives;
 float autocvar_g_instagib_speed_highspeed;
 float autocvar_g_instagib_invis_alpha;
 #define autocvar_g_mirrordamage cvar("g_mirrordamage")
 #define autocvar_g_mirrordamage_virtual cvar("g_mirrordamage_virtual")
 
 float autocvar_g_movement_highspeed = 1;
-float autocvar_g_multijump;
+int autocvar_g_multijump;
 float autocvar_g_multijump_add;
 float autocvar_g_multijump_speed;
 string autocvar_g_mutatormsg;
 float autocvar_g_nexball_basketball_bouncefactor;
 float autocvar_g_nexball_basketball_bouncestop;
 float autocvar_g_nexball_basketball_carrier_highspeed;
-float autocvar_g_nexball_basketball_meter;
+bool autocvar_g_nexball_basketball_meter;
 float autocvar_g_nexball_basketball_meter_maxpower;
 float autocvar_g_nexball_basketball_meter_minpower;
 float autocvar_g_nexball_delay_collect;
@@ -419,79 +418,79 @@ float autocvar_g_nexball_delay_goal;
 float autocvar_g_nexball_delay_start;
 float autocvar_g_nexball_football_bouncefactor;
 float autocvar_g_nexball_football_bouncestop;
-float autocvar_g_nexball_goalleadlimit;
+int autocvar_g_nexball_goalleadlimit;
 #define autocvar_g_nexball_goallimit cvar("g_nexball_goallimit")
-float autocvar_g_nexball_radar_showallplayers;
-float autocvar_g_nexball_sound_bounce;
-float autocvar_g_nexball_trail_color;
+bool autocvar_g_nexball_radar_showallplayers;
+bool autocvar_g_nexball_sound_bounce;
+int autocvar_g_nexball_trail_color;
 //float autocvar_g_nick_flood_penalty;
-float autocvar_g_nick_flood_penalty_red;
-float autocvar_g_nick_flood_penalty_yellow;
+int autocvar_g_nick_flood_penalty_red;
+int autocvar_g_nick_flood_penalty_yellow;
 //float autocvar_g_nick_flood_timeout;
-float autocvar_g_nix_with_healtharmor;
-float autocvar_g_nix_with_blaster;
-float autocvar_g_nix_with_powerups;
-float autocvar_g_nodepthtestitems;
-float autocvar_g_nodepthtestplayers;
-float autocvar_g_norecoil;
+bool autocvar_g_nix_with_healtharmor;
+bool autocvar_g_nix_with_blaster;
+bool autocvar_g_nix_with_powerups;
+bool autocvar_g_nodepthtestitems;
+bool autocvar_g_nodepthtestplayers;
+bool autocvar_g_norecoil;
 float autocvar_g_onslaught_cp_buildhealth;
 float autocvar_g_onslaught_cp_buildtime;
 float autocvar_g_onslaught_cp_health;
 float autocvar_g_onslaught_cp_regen;
 float autocvar_g_onslaught_gen_health;
-float autocvar_g_pickup_cells_max;
-float autocvar_g_pickup_plasma_max;
-float autocvar_g_pickup_fuel_max;
-float autocvar_g_pickup_items;
-float autocvar_g_pickup_nails_max;
-float autocvar_g_pickup_rockets_max;
-float autocvar_g_pickup_shells_max;
+int autocvar_g_pickup_cells_max;
+int autocvar_g_pickup_plasma_max;
+int autocvar_g_pickup_fuel_max;
+int autocvar_g_pickup_items;
+int autocvar_g_pickup_nails_max;
+int autocvar_g_pickup_rockets_max;
+int autocvar_g_pickup_shells_max;
 float autocvar_g_player_alpha;
 float autocvar_g_player_brightness;
-float autocvar_g_playerclip_collisions;
-float autocvar_g_powerups;
-float autocvar_g_projectiles_damage;
-float autocvar_g_projectiles_keep_owner;
-float autocvar_g_projectiles_newton_style;
+bool autocvar_g_playerclip_collisions;
+int autocvar_g_powerups;
+int autocvar_g_projectiles_damage;
+bool autocvar_g_projectiles_keep_owner;
+int autocvar_g_projectiles_newton_style;
 float autocvar_g_projectiles_newton_style_2_maxfactor;
 float autocvar_g_projectiles_newton_style_2_minfactor;
-float autocvar_g_projectiles_spread_style;
+int autocvar_g_projectiles_spread_style;
 #define autocvar_g_race_laps_limit cvar("g_race_laps_limit")
 float autocvar_g_race_qualifying_timelimit;
 float autocvar_g_race_qualifying_timelimit_override;
-float autocvar_g_race_teams;
+int autocvar_g_race_teams;
 float autocvar_g_respawn_delay_small;
-float autocvar_g_respawn_delay_small_count;
+int autocvar_g_respawn_delay_small_count;
 float autocvar_g_respawn_delay_large;
-float autocvar_g_respawn_delay_large_count;
+int autocvar_g_respawn_delay_large_count;
 float autocvar_g_respawn_delay_max;
-float autocvar_g_respawn_ghosts;
+bool autocvar_g_respawn_ghosts;
 float autocvar_g_respawn_ghosts_maxtime;
 float autocvar_g_respawn_ghosts_speed;
-float autocvar_g_respawn_waves;
-float autocvar_g_running_guns;
-float autocvar_g_shootfromcenter;
-float autocvar_g_shootfromclient;
-float autocvar_g_shootfromeye;
+int autocvar_g_respawn_waves;
+bool autocvar_g_running_guns;
+bool autocvar_g_shootfromcenter;
+int autocvar_g_shootfromclient;
+bool autocvar_g_shootfromeye;
 string autocvar_g_shootfromfixedorigin;
-float autocvar_g_showweaponspawns;
-float autocvar_g_spawn_alloweffects;
+int autocvar_g_showweaponspawns;
+bool autocvar_g_spawn_alloweffects;
 float autocvar_g_spawn_furthest;
-float autocvar_g_spawn_useallspawns;
-float autocvar_g_spawnpoints_auto_move_out_of_solid;
+bool autocvar_g_spawn_useallspawns;
+bool autocvar_g_spawnpoints_auto_move_out_of_solid;
 #define autocvar_g_spawnshieldtime cvar("g_spawnshieldtime")
-float autocvar_g_tdm_team_spawns;
-float autocvar_g_tdm_point_limit;
-float autocvar_g_tdm_point_leadlimit;
-float autocvar_g_tdm_teams;
-float autocvar_g_tdm_teams_override;
+bool autocvar_g_tdm_team_spawns;
+int autocvar_g_tdm_point_limit;
+int autocvar_g_tdm_point_leadlimit;
+int autocvar_g_tdm_teams;
+int autocvar_g_tdm_teams_override;
 float autocvar_g_teamdamage_resetspeed;
 float autocvar_g_teamdamage_threshold;
-float autocvar_g_telefrags;
-float autocvar_g_telefrags_avoid;
-float autocvar_g_telefrags_teamplay;
+bool autocvar_g_telefrags;
+bool autocvar_g_telefrags_avoid;
+bool autocvar_g_telefrags_teamplay;
 float autocvar_g_teleport_maxspeed;
-float autocvar_g_throughfloor_debug;
+bool autocvar_g_throughfloor_debug;
 float autocvar_g_throughfloor_damage;
 float autocvar_g_throughfloor_force;
 float autocvar_g_throughfloor_damage_max_stddev;
@@ -504,10 +503,10 @@ float autocvar_g_triggerimpulse_accel_multiplier;
 float autocvar_g_triggerimpulse_accel_power;
 float autocvar_g_triggerimpulse_directional_multiplier;
 float autocvar_g_triggerimpulse_radial_multiplier;
-float autocvar_g_turrets;
+bool autocvar_g_turrets;
 float autocvar_g_turrets_aimidle_delay;
-float autocvar_g_turrets_nofire;
-float autocvar_g_turrets_reloadcvars;
+bool autocvar_g_turrets_nofire;
+bool autocvar_g_turrets_reloadcvars;
 float autocvar_g_turrets_targetscan_maxdelay;
 float autocvar_g_turrets_targetscan_mindelay;
 float autocvar_g_turrets_unit_ewheel_speed_fast;
@@ -545,10 +544,10 @@ float autocvar_g_turrets_unit_walker_turn_walk;
 float autocvar_g_turrets_unit_walker_turn_run;
 float autocvar_g_turrets_unit_walker_turn_strafe;
 float autocvar_g_turrets_unit_walker_turn_swim;
-float autocvar_g_use_ammunition;
-float autocvar_g_waypointeditor;
-float autocvar_g_waypointeditor_auto;
-float autocvar_g_waypoints_for_items;
+bool autocvar_g_use_ammunition;
+bool autocvar_g_waypointeditor;
+int autocvar_g_waypointeditor_auto;
+int autocvar_g_waypoints_for_items;
 float autocvar_g_weapon_charge_colormod_blue_full;
 float autocvar_g_weapon_charge_colormod_blue_half;
 float autocvar_g_weapon_charge_colormod_green_full;
@@ -557,34 +556,34 @@ float autocvar_g_weapon_charge_colormod_hdrmultiplier;
 float autocvar_g_weapon_charge_colormod_red_full;
 float autocvar_g_weapon_charge_colormod_red_half;
 #define autocvar_g_weapon_stay cvar("g_weapon_stay")
-float autocvar_g_weapon_throwable;
+bool autocvar_g_weapon_throwable;
 #define autocvar_g_weaponarena cvar_string("g_weaponarena")
 string autocvar_g_xonoticversion;
 float autocvar_gameversion;
 float autocvar_gameversion_min;
 float autocvar_gameversion_max;
 string autocvar_hostname;
-float autocvar_lastlevel;
-float autocvar_leadlimit;
-float autocvar_leadlimit_and_fraglimit;
-float autocvar_leadlimit_override;
-float autocvar_loddebug;
-float autocvar_minplayers;
+bool autocvar_lastlevel;
+int autocvar_leadlimit;
+int autocvar_leadlimit_and_fraglimit;
+int autocvar_leadlimit_override;
+int autocvar_loddebug;
+int autocvar_minplayers;
 string autocvar_nextmap;
-float autocvar_prvm_backtraceforwarnings;
+bool autocvar_prvm_backtraceforwarnings;
 string autocvar_quit_and_redirect;
 float autocvar_quit_and_redirect_timer;
-float autocvar_quit_when_empty;
+bool autocvar_quit_when_empty;
 float autocvar_r_showbboxes;
-float autocvar_rescan_pending;
-float autocvar_samelevel;
+int autocvar_rescan_pending;
+bool autocvar_samelevel;
 string autocvar_sessionid;
 #define autocvar_skill cvar("skill")
 float autocvar_skill_auto;
 #define autocvar_slowmo cvar("slowmo")
 float autocvar_snd_soundradius;
-float autocvar_spawn_debug;
-float autocvar_speedmeter;
+int autocvar_spawn_debug;
+bool autocvar_speedmeter;
 float autocvar_sv_accelerate;
 float autocvar_sv_accuracy_data_share = 1;
 string autocvar_sv_adminnick;
@@ -599,103 +598,103 @@ float autocvar_sv_airspeedlimit_nonqw;
 float autocvar_sv_airstopaccelerate;
 float autocvar_sv_airstrafeaccel_qw;
 float autocvar_sv_airstrafeaccelerate;
-float autocvar_sv_autoscreenshot;
-float autocvar_sv_cheats;
+bool autocvar_sv_autoscreenshot;
+int autocvar_sv_cheats;
 float autocvar_sv_clientcommand_antispam_time;
-float autocvar_sv_clientcommand_antispam_count;
-float autocvar_sv_curl_serverpackages_auto;
-float autocvar_sv_db_saveasdump;
-float autocvar_sv_defaultcharacter;
+int autocvar_sv_clientcommand_antispam_count;
+bool autocvar_sv_curl_serverpackages_auto;
+bool autocvar_sv_db_saveasdump;
+bool autocvar_sv_defaultcharacter;
 string autocvar_sv_defaultplayercolors;
 string autocvar_sv_defaultplayermodel;
 string autocvar_sv_defaultplayermodel_blue;
 string autocvar_sv_defaultplayermodel_pink;
 string autocvar_sv_defaultplayermodel_red;
 string autocvar_sv_defaultplayermodel_yellow;
-float autocvar_sv_defaultplayerskin;
+int autocvar_sv_defaultplayerskin;
 float autocvar_sv_dodging_delay;
 float autocvar_sv_dodging_height_threshold;
 float autocvar_sv_dodging_horiz_speed;
 float autocvar_sv_dodging_horiz_speed_frozen;
 float autocvar_sv_dodging_ramp_time;
-float autocvar_sv_dodging_sound;
+bool autocvar_sv_dodging_sound;
 float autocvar_sv_dodging_up_speed;
 float autocvar_sv_dodging_wall_distance_threshold;
-float autocvar_sv_dodging_wall_dodging;
-float autocvar_sv_dodging_frozen;
-float autocvar_sv_dodging_frozen_doubletap;
-float autocvar_sv_doublejump;
-float autocvar_sv_eventlog;
-float autocvar_sv_eventlog_console;
-float autocvar_sv_eventlog_files;
-float autocvar_sv_eventlog_files_counter;
+bool autocvar_sv_dodging_wall_dodging;
+bool autocvar_sv_dodging_frozen;
+bool autocvar_sv_dodging_frozen_doubletap;
+bool autocvar_sv_doublejump;
+bool autocvar_sv_eventlog;
+bool autocvar_sv_eventlog_console;
+bool autocvar_sv_eventlog_files;
+int autocvar_sv_eventlog_files_counter;
 string autocvar_sv_eventlog_files_nameprefix;
 string autocvar_sv_eventlog_files_namesuffix;
-float autocvar_sv_eventlog_files_timestamps;
+bool autocvar_sv_eventlog_files_timestamps;
 float autocvar_sv_friction;
 float autocvar_sv_friction_on_land;
 float autocvar_sv_gameplayfix_q2airaccelerate;
-float autocvar_sv_gentle;
+int autocvar_sv_gentle;
 #define autocvar_sv_gravity cvar("sv_gravity")
 string autocvar_sv_intermission_cdtrack;
 string autocvar_sv_jumpspeedcap_max;
 float autocvar_sv_jumpspeedcap_max_disable_on_ramps;
 string autocvar_sv_jumpspeedcap_min;
 float autocvar_sv_jumpvelocity;
-float autocvar_sv_logscores_bots;
-float autocvar_sv_logscores_console;
-float autocvar_sv_logscores_file;
+bool autocvar_sv_logscores_bots;
+bool autocvar_sv_logscores_console;
+bool autocvar_sv_logscores_file;
 string autocvar_sv_logscores_filename;
 float autocvar_sv_mapchange_delay;
 float autocvar_sv_maxairspeed;
 float autocvar_sv_maxairstrafespeed;
 float autocvar_sv_maxspeed;
 string autocvar_sv_motd;
-float autocvar_sv_precacheplayermodels;
+bool autocvar_sv_precacheplayermodels;
 //float autocvar_sv_precacheweapons; // WEAPONTODO?
-float autocvar_sv_q3acompat_machineshotgunswap;
-float autocvar_sv_ready_restart;
-float autocvar_sv_ready_restart_after_countdown;
-float autocvar_sv_ready_restart_repeatable;
-float autocvar_sv_servermodelsonly;
-float autocvar_sv_spectate;
+bool autocvar_sv_q3acompat_machineshotgunswap;
+bool autocvar_sv_ready_restart;
+bool autocvar_sv_ready_restart_after_countdown;
+bool autocvar_sv_ready_restart_repeatable;
+bool autocvar_sv_servermodelsonly;
+int autocvar_sv_spectate;
 float autocvar_sv_spectator_speed_multiplier;
-float autocvar_sv_status_privacy;
+bool autocvar_sv_status_privacy;
 float autocvar_sv_stepheight;
 float autocvar_sv_stopspeed;
 float autocvar_sv_strengthsound_antispam_refire_threshold;
 float autocvar_sv_strengthsound_antispam_time;
-float autocvar_sv_teamnagger;
-float autocvar_sv_timeout;
+bool autocvar_sv_teamnagger;
+bool autocvar_sv_timeout;
 float autocvar_sv_timeout_leadtime;
 float autocvar_sv_timeout_length;
-float autocvar_sv_timeout_number;
+int autocvar_sv_timeout_number;
 float autocvar_sv_timeout_resumetime;
-float autocvar_sv_vote_call;
-float autocvar_sv_vote_change;
+bool autocvar_sv_vote_call;
+bool autocvar_sv_vote_change;
 string autocvar_sv_vote_commands;
-float autocvar_sv_vote_gametype;
+bool autocvar_sv_vote_gametype;
 float autocvar_sv_vote_gametype_timeout;
 string autocvar_sv_vote_gametype_options;
 float autocvar_sv_vote_gametype_keeptwotime;
-float autocvar_sv_vote_gametype_default_current;
-float autocvar_sv_vote_limit;
+bool autocvar_sv_vote_gametype_default_current;
+int autocvar_sv_vote_limit;
 float autocvar_sv_vote_majority_factor;
 float autocvar_sv_vote_majority_factor_of_voted;
-float autocvar_sv_vote_master;
-float autocvar_sv_vote_master_callable;
+bool autocvar_sv_vote_master;
+bool autocvar_sv_vote_master_callable;
 string autocvar_sv_vote_master_commands;
 string autocvar_sv_vote_master_password;
-float autocvar_sv_vote_master_playerlimit;
-float autocvar_sv_vote_no_stops_vote;
-float autocvar_sv_vote_nospectators;
+int autocvar_sv_vote_master_playerlimit;
+bool autocvar_sv_vote_no_stops_vote;
+int autocvar_sv_vote_nospectators;
 //string autocvar_sv_vote_only_commands;
-float autocvar_sv_vote_override_mostrecent;
-float autocvar_sv_vote_singlecount;
+bool autocvar_sv_vote_override_mostrecent;
+bool autocvar_sv_vote_singlecount;
 float autocvar_sv_vote_stop;
 float autocvar_sv_vote_timeout;
 float autocvar_sv_vote_wait;
-float autocvar_sv_vote_gamestart;
+bool autocvar_sv_vote_gamestart;
 float autocvar_sv_warsowbunny_accel;
 float autocvar_sv_warsowbunny_airforwardaccel;
 float autocvar_sv_warsowbunny_backtosideratio;
@@ -707,8 +706,8 @@ float autocvar_sv_waypointsprite_limitedrange;
 string autocvar_sv_weaponstats_file;
 float autocvar_sv_gibhealth;
 float autocvar_sys_ticrate;
-float autocvar_teamplay_lockonrestart;
-float autocvar_teamplay_mode;
+bool autocvar_teamplay_lockonrestart;
+int autocvar_teamplay_mode;
 #define autocvar_timelimit cvar("timelimit")
 #define autocvar_timelimit_override cvar("timelimit_override")
 float autocvar_timelimit_increment;
@@ -716,66 +715,66 @@ float autocvar_timelimit_decrement;
 float autocvar_timelimit_min;
 float autocvar_timelimit_max;
 float autocvar_timelimit_overtime;
-float autocvar_timelimit_overtimes;
+int autocvar_timelimit_overtimes;
 float autocvar_timelimit_suddendeath;
 #define autocvar_utf8_enable cvar("utf8_enable")
-float autocvar_waypoint_benchmark;
-float autocvar_sv_gameplayfix_gravityunaffectedbyticrate;
+bool autocvar_waypoint_benchmark;
+bool autocvar_sv_gameplayfix_gravityunaffectedbyticrate;
 float autocvar_g_trueaim_minrange;
-float autocvar_g_debug_defaultsounds;
+bool autocvar_g_debug_defaultsounds;
 float autocvar_g_grab_range;
-float autocvar_g_sandbox_info;
-float autocvar_g_sandbox_readonly;
+int autocvar_g_sandbox_info;
+bool autocvar_g_sandbox_readonly;
 string autocvar_g_sandbox_storage_name;
 float autocvar_g_sandbox_storage_autosave;
-float autocvar_g_sandbox_storage_autoload;
+bool autocvar_g_sandbox_storage_autoload;
 float autocvar_g_sandbox_editor_flood;
-float autocvar_g_sandbox_editor_maxobjects;
-float autocvar_g_sandbox_editor_free;
+int autocvar_g_sandbox_editor_maxobjects;
+int autocvar_g_sandbox_editor_free;
 float autocvar_g_sandbox_editor_distance_spawn;
 float autocvar_g_sandbox_editor_distance_edit;
 float autocvar_g_sandbox_object_scale_min;
 float autocvar_g_sandbox_object_scale_max;
 float autocvar_g_sandbox_object_material_velocity_min;
 float autocvar_g_sandbox_object_material_velocity_factor;
-float autocvar_g_max_info_autoscreenshot;
-float autocvar_physics_ode;
-float autocvar_g_physical_items;
+int autocvar_g_max_info_autoscreenshot;
+bool autocvar_physics_ode;
+int autocvar_g_physical_items;
 float autocvar_g_physical_items_damageforcescale;
 float autocvar_g_physical_items_reset;
 float autocvar_g_monsters;
-float autocvar_g_monsters_edit;
-float autocvar_g_monsters_sounds;
+bool autocvar_g_monsters_edit;
+bool autocvar_g_monsters_sounds;
 float autocvar_g_monsters_think_delay;
-float autocvar_g_monsters_max;
-float autocvar_g_monsters_max_perplayer;
+int autocvar_g_monsters_max;
+int autocvar_g_monsters_max_perplayer;
 float autocvar_g_monsters_target_range;
-float autocvar_g_monsters_target_infront;
+bool autocvar_g_monsters_target_infront;
 float autocvar_g_monsters_attack_range;
-float autocvar_g_monsters_score_kill;
-float autocvar_g_monsters_score_spawned;
-float autocvar_g_monsters_typefrag;
-float autocvar_g_monsters_owners;
+int autocvar_g_monsters_score_kill;
+int autocvar_g_monsters_score_spawned;
+bool autocvar_g_monsters_typefrag;
+bool autocvar_g_monsters_owners;
 float autocvar_g_monsters_miniboss_chance;
 float autocvar_g_monsters_miniboss_healthboost;
 float autocvar_g_monsters_drop_time;
 float autocvar_g_monsters_spawnshieldtime;
-float autocvar_g_monsters_teams;
+bool autocvar_g_monsters_teams;
 float autocvar_g_monsters_respawn_delay;
-float autocvar_g_monsters_respawn;
+bool autocvar_g_monsters_respawn;
 float autocvar_g_monsters_armor_blockpercent;
 float autocvar_g_touchexplode_radius;
 float autocvar_g_touchexplode_damage;
 float autocvar_g_touchexplode_edgedamage;
 float autocvar_g_touchexplode_force;
 float autocvar_g_invasion_round_timelimit;
-float autocvar_g_invasion_teams;
-float autocvar_g_invasion_team_spawns;
+int autocvar_g_invasion_teams;
+bool autocvar_g_invasion_team_spawns;
 float autocvar_g_invasion_spawnpoint_spawn_delay;
 #define autocvar_g_invasion_point_limit cvar("g_invasion_point_limit")
 float autocvar_g_invasion_warmup;
-float autocvar_g_invasion_monster_count;
-float autocvar_g_invasion_zombies_only;
+int autocvar_g_invasion_monster_count;
+bool autocvar_g_invasion_zombies_only;
 float autocvar_g_invasion_spawn_delay;
 #define autocvar_g_bloodloss cvar("g_bloodloss")
 float autocvar_g_random_gravity_negative_chance;
@@ -784,11 +783,11 @@ float autocvar_g_random_gravity_max;
 float autocvar_g_random_gravity_positive;
 float autocvar_g_random_gravity_negative;
 float autocvar_g_random_gravity_delay;
-float autocvar_g_nades;
+bool autocvar_g_nades;
 vector autocvar_g_nades_throw_offset;
-float autocvar_g_nades_spawn;
-float autocvar_g_nades_spawn_count;
-float autocvar_g_nades_client_select;
+bool autocvar_g_nades_spawn;
+int autocvar_g_nades_spawn_count;
+bool autocvar_g_nades_client_select;
 float autocvar_g_nades_nade_lifetime;
 float autocvar_g_nades_nade_minforce;
 float autocvar_g_nades_nade_maxforce;
@@ -798,39 +797,39 @@ float autocvar_g_nades_nade_damage;
 float autocvar_g_nades_nade_edgedamage;
 float autocvar_g_nades_nade_radius;
 float autocvar_g_nades_nade_force;
-float autocvar_g_nades_nade_newton_style;
+int autocvar_g_nades_nade_newton_style;
 int autocvar_g_nades_napalm_ball_count;
 float autocvar_g_nades_napalm_ball_spread;
 float autocvar_g_nades_napalm_ball_damage;
 float autocvar_g_nades_napalm_ball_damageforcescale;
 float autocvar_g_nades_napalm_ball_lifetime;
 float autocvar_g_nades_napalm_ball_radius;
-float autocvar_g_nades_napalm_blast;
+bool autocvar_g_nades_napalm_blast;
 float autocvar_g_nades_napalm_fountain_lifetime;
 float autocvar_g_nades_napalm_fountain_delay;
 float autocvar_g_nades_napalm_fountain_radius;
 float autocvar_g_nades_napalm_fountain_damage;
 float autocvar_g_nades_napalm_fountain_edgedamage;
 float autocvar_g_nades_napalm_burntime;
-float autocvar_g_nades_napalm_selfdamage;
-float autocvar_g_nades_nade_type;
-float autocvar_g_nades_bonus_type;
-float autocvar_g_nades_bonus;
-float autocvar_g_nades_bonus_onstrength;
-float autocvar_g_nades_bonus_client_select;
-float autocvar_g_nades_bonus_max;
-float autocvar_g_nades_bonus_score_max;
-float autocvar_g_nades_bonus_score_time;
-float autocvar_g_nades_bonus_score_time_flagcarrier;
-float autocvar_g_nades_bonus_score_minor;
-float autocvar_g_nades_bonus_score_low;
-float autocvar_g_nades_bonus_score_high;
-float autocvar_g_nades_bonus_score_medium;
-float autocvar_g_nades_bonus_score_spree;
+bool autocvar_g_nades_napalm_selfdamage;
+int autocvar_g_nades_nade_type;
+int autocvar_g_nades_bonus_type;
+bool autocvar_g_nades_bonus;
+bool autocvar_g_nades_bonus_onstrength;
+bool autocvar_g_nades_bonus_client_select;
+int autocvar_g_nades_bonus_max;
+int autocvar_g_nades_bonus_score_max;
+int autocvar_g_nades_bonus_score_time;
+int autocvar_g_nades_bonus_score_time_flagcarrier;
+int autocvar_g_nades_bonus_score_minor;
+int autocvar_g_nades_bonus_score_low;
+int autocvar_g_nades_bonus_score_high;
+int autocvar_g_nades_bonus_score_medium;
+int autocvar_g_nades_bonus_score_spree;
 float autocvar_g_nades_ice_freeze_time;
 float autocvar_g_nades_ice_health;
-float autocvar_g_nades_ice_explode;
-float autocvar_g_nades_ice_teamcheck;
+bool autocvar_g_nades_ice_explode;
+bool autocvar_g_nades_ice_teamcheck;
 float autocvar_g_nades_heal_time;
 float autocvar_g_nades_heal_rate;
 float autocvar_g_nades_heal_friend;
@@ -840,27 +839,27 @@ float autocvar_g_nades_pokenade_monster_lifetime;
 float autocvar_g_campcheck_damage;
 float autocvar_g_campcheck_distance;
 float autocvar_g_campcheck_interval;
-float autocvar_g_jump_grunt;
-float autocvar_g_overkill_powerups_replace;
+bool autocvar_g_jump_grunt;
+bool autocvar_g_overkill_powerups_replace;
 float autocvar_g_overkill_superguns_respawn_time;
-float autocvar_g_overkill_100h_anyway;
-float autocvar_g_overkill_100a_anyway;
-float autocvar_g_overkill_ammo_charge;
+bool autocvar_g_overkill_100h_anyway;
+bool autocvar_g_overkill_100a_anyway;
+bool autocvar_g_overkill_ammo_charge;
 float autocvar_g_overkill_ammo_charge_notice;
 float autocvar_g_overkill_ammo_charge_limit;
 float autocvar_g_spawn_near_teammate_distance;
-float autocvar_g_spawn_near_teammate_ignore_spawnpoint;
+bool autocvar_g_spawn_near_teammate_ignore_spawnpoint;
 float autocvar_g_spawn_near_teammate_ignore_spawnpoint_delay;
 float autocvar_g_spawn_near_teammate_ignore_spawnpoint_delay_death;
-float autocvar_g_spawn_near_teammate_ignore_spawnpoint_check_health;
-float autocvar_g_spawn_near_teammate_ignore_spawnpoint_closetodeath;
+int autocvar_g_spawn_near_teammate_ignore_spawnpoint_check_health;
+bool autocvar_g_spawn_near_teammate_ignore_spawnpoint_closetodeath;
 float autocvar_g_buffs_waypoint_distance;
-float autocvar_g_buffs_randomize;
+bool autocvar_g_buffs_randomize;
 float autocvar_g_buffs_random_lifetime;
-float autocvar_g_buffs_random_location;
-float autocvar_g_buffs_random_location_attempts;
-float autocvar_g_buffs_spawn_count;
-float autocvar_g_buffs_replace_powerups;
+bool autocvar_g_buffs_random_location;
+int autocvar_g_buffs_random_location_attempts;
+int autocvar_g_buffs_spawn_count;
+bool autocvar_g_buffs_replace_powerups;
 float autocvar_g_buffs_cooldown_activate;
 float autocvar_g_buffs_cooldown_respawn;
 float autocvar_g_buffs_resistance_blockpercent;
index 3bc5cc762f231b2e92f8df7dfdfe4b05e9d55bb1..222e0291337ea9c52fdf357799a5ecb7ad99e577 100644 (file)
@@ -301,7 +301,7 @@ void FixPlayermodel()
        defaultskin = 0;
        chmdl = false;
 
-       if(autocvar_sv_defaultcharacter == 1)
+       if(autocvar_sv_defaultcharacter)
        {
                if(teamplay)
                {
@@ -651,7 +651,7 @@ void PutClientInServer (void)
 .float ebouncefactor, ebouncestop; // electro's values
 // TODO do we need all these fields, or should we stop autodetecting runtime
 // changes and just have a console command to update this?
-float ClientInit_SendEntity(entity to, float sf)
+float ClientInit_SendEntity(entity to, int sf)
 {
        WriteByte(MSG_ENTITY, ENT_CLIENT_INIT);
        WriteByte(MSG_ENTITY, g_nexball_meter_period * 32);
index 49d1c1b4691c3136f11c4fd3aa87c27a816c9ea9..afd52171e1d2f7e834d63bae8a320a6576780f6d 100644 (file)
@@ -147,7 +147,7 @@ void player_anim (void)
        }
 }
 
-void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        float take, save;
        vector v;
index cf5ec0a7d1df502a7297636ed9d51ddcd061c079..cd1ec2e15be6dc19b9ac2fe52507203c4d85bb49 100644 (file)
@@ -16,7 +16,7 @@ void player_setupanimsformodel();
 
 void player_anim (void);
 
-void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force);
+void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force);
 
 // g_<gametype>_str:
 // If 0, default is used.
index 822c5163c384c1476656d825ab0a009f549ac406..54d1ed041f3afda186a7689a674ea572e3a0612b 100644 (file)
@@ -64,7 +64,7 @@ float server_is_dedicated;
 
 // Fields
 
-.void(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) event_damage;
+.void(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) event_damage;
 
 //.string      wad;
 //.string      map;
@@ -333,7 +333,7 @@ float have_team_spawns_forteam[17]; // 0 = this team has no spawns, 1 = this tea
 .entity killindicator;
 .float killindicator_teamchange;
 
-void Damage (entity targ, entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force);
+void Damage (entity targ, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force);
 
 float lockteams;
 
@@ -347,7 +347,7 @@ float next_pingtime;
 
 .float Version;
 .int SendFlags;
-.float(entity to, float sendflags) SendEntity;
+.bool(entity to, int sendflags) SendEntity;
 
 // player sounds, voice messages
 // TODO implemented fall and falling
@@ -519,7 +519,7 @@ string matchid;
 
 .float stat_leadlimit;
 
-float radar_showennemies;
+bool radar_showennemies;
 
 #ifdef PROFILING
 float client_cefc_accumulator;
@@ -527,7 +527,7 @@ float client_cefc_accumulatortime;
 #endif
 
 .float weapon_load[WEP_MAXCOUNT];
-.float ammo_none; // used by the reloading system, must always be 0
+.int ammo_none; // used by the reloading system, must always be 0
 .float clip_load;
 .float old_clip_load;
 .float clip_size;
@@ -539,7 +539,7 @@ float client_cefc_accumulatortime;
 .float vortex_chargepool_ammo;
 .float hagar_load;
 
-.float grab; // 0 = can't grab, 1 = owner can grab, 2 = owner and team mates can grab, 3 = anyone can grab
+.int grab; // 0 = can't grab, 1 = owner can grab, 2 = owner and team mates can grab, 3 = anyone can grab
 
 #define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_CORPSE; (e).dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE
 // when doing this, hagar can go through clones
index 2b78ebe0b2d309b5d33ef93768a3ba6cae4ce699..82374c41b9cad824379f68c2880b906f98249ebe 100644 (file)
@@ -8,7 +8,7 @@
     #include "defs.qh"
 #endif
 
-float Casing_SendEntity(entity to, float sf)
+float Casing_SendEntity(entity to, int sf)
 {
        WriteByte(MSG_ENTITY, ENT_CLIENT_CASING);
        WriteByte(MSG_ENTITY, self.state); // actually type
index d170cf4c020db0b7e229777a858fb5c55afb6825..788eb345fa3d81702103714db1e6295747301097 100644 (file)
@@ -27,7 +27,7 @@
     #include "spawnpoints.qh"
 #endif
 
-float Damage_DamageInfo_SendEntity(entity to, float sf)
+float Damage_DamageInfo_SendEntity(entity to, int sf)
 {
        WriteByte(MSG_ENTITY, ENT_CLIENT_DAMAGEINFO);
        WriteShort(MSG_ENTITY, self.projectiledeathtype);
@@ -42,7 +42,7 @@ float Damage_DamageInfo_SendEntity(entity to, float sf)
        return true;
 }
 
-void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad, vector force, float deathtype, float bloodtype, entity dmgowner)
+void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad, vector force, int deathtype, float bloodtype, entity dmgowner)
 {
        // TODO maybe call this from non-edgedamage too?
        // TODO maybe make the client do the particle effects for the weapons and the impact sounds using this info?
@@ -83,7 +83,7 @@ void UpdateFrags(entity player, float f)
        PlayerTeamScore_AddScore(player, f);
 }
 
-void GiveFrags (entity attacker, entity targ, float f, float deathtype)
+void GiveFrags (entity attacker, entity targ, float f, int deathtype)
 {
        // TODO route through PlayerScores instead
        if(gameover) return;
@@ -203,7 +203,7 @@ string AppendItemcodes(string s, entity player)
        return s;
 }
 
-void LogDeath(string mode, float deathtype, entity killer, entity killed)
+void LogDeath(string mode, int deathtype, entity killer, entity killed)
 {
        string s;
        if(!autocvar_sv_eventlog)
@@ -225,7 +225,7 @@ void LogDeath(string mode, float deathtype, entity killer, entity killed)
 void Obituary_SpecialDeath(
        entity notif_target,
        float murder,
-       float deathtype,
+       int deathtype,
        string s1, string s2, string s3,
        float f1, float f2, float f3)
 {
@@ -285,7 +285,7 @@ void Obituary_SpecialDeath(
 float Obituary_WeaponDeath(
        entity notif_target,
        float murder,
-       float deathtype,
+       int deathtype,
        string s1, string s2, string s3,
        float f1, float f2)
 {
@@ -329,7 +329,7 @@ float Obituary_WeaponDeath(
        return false;
 }
 
-void Obituary(entity attacker, entity inflictor, entity targ, float deathtype)
+void Obituary(entity attacker, entity inflictor, entity targ, int deathtype)
 {
        // Sanity check
        if (!IS_PLAYER(targ)) { backtrace("Obituary called on non-player?!\n"); return; }
@@ -635,7 +635,7 @@ void Unfreeze (entity targ)
        targ.iceblock = world;
 }
 
-void Damage (entity targ, entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void Damage (entity targ, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        float mirrordamage;
        float mirrorforce;
@@ -949,7 +949,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
        }
 }
 
-float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float inflictorselfdamage, float forceintensity, float deathtype, entity directhitentity)
+float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float inflictorselfdamage, float forceintensity, int deathtype, entity directhitentity)
        // Returns total damage applies to creatures
 {
        entity  targ;
@@ -1138,7 +1138,7 @@ float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector in
        return total_damage_to_creatures;
 }
 
-float RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, float deathtype, entity directhitentity)
+float RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype, entity directhitentity)
 {
        return RadiusDamageForSource (inflictor, (inflictor.origin + (inflictor.mins + inflictor.maxs) * 0.5), inflictor.velocity, attacker, coredamage, edgedamage, rad, cantbe, mustbe, false, forceintensity, deathtype, directhitentity);
 }
index 4cc3f6f63e901d05e4fc863ad89ca76ce5606144..b98693de6c9c5fa6b2652fbce1da9862ef52ab56 100644 (file)
@@ -35,9 +35,9 @@
 .float dmg_force;
 .float dmg_radius;
 
-float Damage_DamageInfo_SendEntity(entity to, float sf);
+float Damage_DamageInfo_SendEntity(entity to, int sf);
 
-void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad, vector force, float deathtype, float bloodtype, entity dmgowner);
+void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad, vector force, int deathtype, float bloodtype, entity dmgowner);
 
 float checkrules_firstblood;
 
@@ -60,16 +60,16 @@ void UpdateFrags(entity player, float f);
 // NOTE: f=0 means still count as a (positive) kill, but count no frags for it
 void W_SwitchWeapon_Force(entity e, float w);
 entity GiveFrags_randomweapons;
-void GiveFrags (entity attacker, entity targ, float f, float deathtype);
+void GiveFrags (entity attacker, entity targ, float f, int deathtype);
 
 string AppendItemcodes(string s, entity player);
 
-void LogDeath(string mode, float deathtype, entity killer, entity killed);
+void LogDeath(string mode, int deathtype, entity killer, entity killed);
 
 void Obituary_SpecialDeath(
        entity notif_target,
        float murder,
-       float deathtype,
+       int deathtype,
        string s1, string s2, string s3,
        float f1, float f2, float f3);
 
@@ -77,11 +77,11 @@ float w_deathtype;
 float Obituary_WeaponDeath(
        entity notif_target,
        float murder,
-       float deathtype,
+       int deathtype,
        string s1, string s2, string s3,
        float f1, float f2);
 
-void Obituary(entity attacker, entity inflictor, entity targ, float deathtype);
+void Obituary(entity attacker, entity inflictor, entity targ, int deathtype);
 
 void Ice_Think();
 
@@ -94,13 +94,13 @@ entity damage_targ;
 entity damage_inflictor;
 entity damage_attacker;
 
-void Damage (entity targ, entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force);
+void Damage (entity targ, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force);
 
 float RadiusDamage_running;
-float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float inflictorselfdamage, float forceintensity, float deathtype, entity directhitentity);
+float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float inflictorselfdamage, float forceintensity, int deathtype, entity directhitentity);
        // Returns total damage applies to creatures
 
-float RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, float deathtype, entity directhitentity);
+float RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype, entity directhitentity);
 
 .float fire_damagepersec;
 .float fire_endtime;
index 310833e4367ce2f036ad10c4570be683bfb4f275..f0b9537046f3356153711dede0519357fe0dc62e 100644 (file)
@@ -105,7 +105,7 @@ void GrapplingHook_Stop()
 }
 
 .vector hook_start, hook_end;
-float GrapplingHookSend(entity to, float sf)
+float GrapplingHookSend(entity to, int sf)
 {
        WriteByte(MSG_ENTITY, ENT_CLIENT_HOOK);
        sf = sf & 0x7F;
@@ -289,7 +289,7 @@ void GrapplingHookTouch (void)
        //self.realowner.disableclientprediction = true;
 }
 
-void GrapplingHook_Damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void GrapplingHook_Damage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if(self.health <= 0)
                return;
index 6e1c06d056f2eb5bf3306240042ad3b933af56bc..0214b9ed36b802156688eb1f98582e2b9c82b0af 100644 (file)
@@ -60,7 +60,7 @@ void g_clientmodel_dropbyspawnflags()
                self.SendFlags |= 2;
 }
 
-float g_clientmodel_genericsendentity (entity to, float sf)
+float g_clientmodel_genericsendentity (entity to, int sf)
 {
        sf = sf & 0x0F;
        if(self.angles != '0 0 0')
index 9bb1e06e7affc73015e5a8b34bbf0340a6bc004a..d58d4105e5ca6c266f8ea302ccbdc3c56f5b7a31 100644 (file)
@@ -225,7 +225,7 @@ void multi_touch()
        multi_trigger ();
 }
 
-void multi_eventdamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void multi_eventdamage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if (!self.takedamage)
                return;
@@ -984,7 +984,7 @@ void spawnfunc_func_sparks()
        spawnfunc_func_pointparticles();
 }
 
-float rainsnow_SendEntity(entity to, float sf)
+float rainsnow_SendEntity(entity to, int sf)
 {
        WriteByte(MSG_ENTITY, ENT_CLIENT_RAINSNOW);
        WriteByte(MSG_ENTITY, self.state);
index 35c39f290940fae9734872b7b8ee1bb4f7571b4f..793d7990957e6edb953dc6efa2618abe5483bc74 100644 (file)
@@ -48,7 +48,7 @@ void multi_use();
 
 void multi_touch();
 
-void multi_eventdamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force);
+void multi_eventdamage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force);
 
 void multi_reset();
 
@@ -193,7 +193,7 @@ void spawnfunc_func_pointparticles();
 
 void spawnfunc_func_sparks();
 
-float rainsnow_SendEntity(entity to, float sf);
+float rainsnow_SendEntity(entity to, int sf);
 
 /*QUAKED spawnfunc_func_rain (0 .5 .8) ?
 This is an invisible area like a trigger, which rain falls inside of.
index fdff4a66f369bf8c9e8cf45709e146395ad0f2d7..4ef4f45ff23e1b1453ab33ec3a3d775c393385b9 100644 (file)
@@ -1,6 +1,6 @@
 #include "g_violence.qh"
 
-float Violence_GibSplash_SendEntity(entity to, float sf)
+float Violence_GibSplash_SendEntity(entity to, int sf)
 {
        WriteByte(MSG_ENTITY, ENT_CLIENT_GIBSPLASH);
        WriteByte(MSG_ENTITY, self.state); // actually type
index 1f1df0683a7bfd8ca66b56bc46eb148bcff3bf2b..98d2b811fcd2858cec93686b65fd3e35da9fd7ea 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef G_VIOLENCE_H
 #define G_VIOLENCE_H
 
-float Violence_GibSplash_SendEntity(entity to, float sf);
+float Violence_GibSplash_SendEntity(entity to, int sf);
 
 // TODO maybe convert this to a TE?
 void Violence_GibSplash_At(vector org, vector dir, float type, float amount, entity gibowner, entity attacker);
index 04f8ff7b38afbf7551a2a162bf1153acc043c6cd..345bc5bc13b53577ce2fab6e9ec9ad72bd47df7e 100644 (file)
@@ -509,7 +509,7 @@ void detect_maptype()
 }
 
 entity randomseed;
-float RandomSeed_Send(entity to, float sf)
+float RandomSeed_Send(entity to, int sf)
 {
        WriteByte(MSG_ENTITY, ENT_CLIENT_RANDOMSEED);
        WriteShort(MSG_ENTITY, self.cnt);
@@ -686,7 +686,7 @@ void spawnfunc_worldspawn (void)
        // character set: ASCII 33-126 without the following characters: : ; ' " \ $
        if(autocvar_sv_eventlog)
        {
-               s = sprintf("%d.%s.%06d", ftos(autocvar_sv_eventlog_files_counter), strftime(false, "%s"), floor(random() * 1000000));
+               s = sprintf("%d.%s.%06d", itos(autocvar_sv_eventlog_files_counter), strftime(false, "%s"), floor(random() * 1000000));
                matchid = strzone(s);
 
                GameLogEcho(strcat(":gamestart:", GetGametype(), "_", GetMapname(), ":", s));
@@ -1964,7 +1964,7 @@ float WinningCondition_RanOutOfSpawns()
        if(have_team_spawns <= 0)
                return WINNING_NO;
 
-       if(autocvar_g_spawn_useallspawns <= 0)
+       if(!autocvar_g_spawn_useallspawns)
                return WINNING_NO;
 
        if(!some_spawn_has_been_used)
index fd42c99ab9c6e5f30ffdfdb573a887149f2ad14f..178dfe7ba5986769ed8e567b35c86401a0c0e206 100644 (file)
@@ -252,7 +252,7 @@ void MapVote_WriteMask()
        }
 }
 
-float MapVote_SendEntity(entity to, float sf)
+float MapVote_SendEntity(entity to, int sf)
 {
        float i;
 
index d998ea7999b836763b21472eedd131204983e1b2..7660b7e03dae09a975b737c23ae48372640205d5 100644 (file)
@@ -101,7 +101,7 @@ float DistributeEvenly_GetRandomized(float weight)
 void GameLogEcho(string s)
 {
     string fn;
-    float matches;
+    int matches;
 
     if (autocvar_sv_eventlog_files)
     {
@@ -109,7 +109,7 @@ void GameLogEcho(string s)
         {
             logfile_open = true;
             matches = autocvar_sv_eventlog_files_counter + 1;
-            cvar_set("sv_eventlog_files_counter", ftos(matches));
+            cvar_set("sv_eventlog_files_counter", itos(matches));
             fn = ftos(matches);
             if (strlen(fn) < 8)
                 fn = strcat(substring("00000000", 0, 8 - strlen(fn)), fn);
@@ -822,7 +822,7 @@ void soundtoat(float _dest, entity e, vector o, float chan, string samp, float v
     entno = num_for_edict(e);
     idx = precache_sound_index(samp);
 
-    float sflags;
+    int sflags;
     sflags = 0;
 
     _atten = floor(_atten * 64);
@@ -1275,7 +1275,7 @@ void SetCustomizer(entity e, float(void) customizer, void(void) uncustomizer)
 }
 
 
-void Net_LinkEntity(entity e, float docull, float dt, float(entity, float) sendfunc)
+void Net_LinkEntity(entity e, float docull, float dt, bool(entity, int) sendfunc)
 {
     vector mi, ma;
 
@@ -1836,7 +1836,7 @@ vector gettaginfo_relative(entity e, float tag)
 
 .float scale2;
 
-float modeleffect_SendEntity(entity to, float sf)
+float modeleffect_SendEntity(entity to, int sf)
 {
        float f;
        WriteByte(MSG_ENTITY, ENT_CLIENT_MODELEFFECT);
index 2a67316101f846261dc819f6476bf7ef23f539e7..d0103d80ef17248ca2e365e92d2f91fdfb6b1b7f 100644 (file)
@@ -397,7 +397,7 @@ void kh_Key_AssignTo(entity key, entity player)  // runs every time a key is pic
        }
 }
 
-void kh_Key_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void kh_Key_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if(self.owner)
                return;
index d1f20f7ee950e5e3af577fe9dcbc154302cda51a..7d02e6ff91da634f5197e81521e9e6ba37d27716 100644 (file)
@@ -25,7 +25,7 @@ void onslaught_link_checkupdate();
 entity ons_red_generator;
 entity ons_blue_generator;
 
-void ons_gib_damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector vforce)
+void ons_gib_damage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector vforce)
 {
        self.velocity = self.velocity + vforce;
 }
@@ -570,7 +570,7 @@ void onslaught_generator_deaththink()
        self.count = self.count - 1;
 }
 
-void onslaught_generator_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void onslaught_generator_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        float i;
        if (damage <= 0)
@@ -966,7 +966,7 @@ void spawnfunc_onslaught_generator()
 float ons_notification_time_team1;
 float ons_notification_time_team2;
 
-void onslaught_controlpoint_icon_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void onslaught_controlpoint_icon_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        entity oself;
        float nag;
index ad52d3e2919f29a3563927a4c900ca401f35ee40..58d24a4d820c526376026c84bfa1c774e1506545 100644 (file)
@@ -96,7 +96,7 @@ MUTATOR_HOOKFUNCTION(dodging_PlayerPhysics) {
                          self.velocity
                        + (autocvar_sv_dodging_up_speed * v_up);
 
-               if (autocvar_sv_dodging_sound == 1)
+               if (autocvar_sv_dodging_sound)
                        PlayerSound(playersound_jump, CH_PLAYER, VOICETYPE_PLAYERSOUND);
 
                animdecide_setaction(self, ANIMACTION_JUMP, true);
@@ -118,9 +118,10 @@ MUTATOR_HOOKFUNCTION(dodging_PlayerPhysics) {
 
 
 // returns 1 if the player is close to a wall
-float check_close_to_wall(float threshold) {
-       if (autocvar_sv_dodging_wall_dodging == 0)
-               return 0;
+bool check_close_to_wall(float threshold)
+{
+       if(!autocvar_sv_dodging_wall_dodging)
+               return false;
 
        vector trace_start;
        vector trace_end;
@@ -130,31 +131,32 @@ float check_close_to_wall(float threshold) {
        trace_end = self.origin + (1000*v_right);
        tracebox(trace_start, self.mins, self.maxs, trace_end, true, self);
        if (trace_fraction < 1 && vlen (self.origin - trace_endpos) < threshold)
-               return 1;
+               return true;
 
        trace_end = self.origin - (1000*v_right);
        tracebox(trace_start, self.mins, self.maxs, trace_end, true, self);
        if (trace_fraction < 1 && vlen (self.origin - trace_endpos) < threshold)
-               return 1;
+               return true;
 
        trace_end = self.origin + (1000*v_forward);
        tracebox(trace_start, self.mins, self.maxs, trace_end, true, self);
        if (trace_fraction < 1 && vlen (self.origin - trace_endpos) < threshold)
-               return 1;
+               return true;
 
        trace_end = self.origin - (1000*v_forward);
        tracebox(trace_start, self.mins, self.maxs, trace_end, true, self);
        if (trace_fraction < 1 && vlen (self.origin - trace_endpos) < threshold)
-               return 1;
+               return true;
 
-       return 0;
+       return false;
 }
 
-float check_close_to_ground(float threshold) {
+bool check_close_to_ground(float threshold)
+{
        if (self.flags & FL_ONGROUND)
-               return 1;
+               return true;
 
-       return 0;
+       return false;
 }
 
 
index 60b2acce56053ea2b1d2ab295b393c99737a0df6..8f7857b166846d58df78307e02a7eea8f444dd60 100644 (file)
@@ -475,7 +475,7 @@ void nade_monster_boom()
 void nade_boom()
 {
        string expef;
-       float nade_blast = 1;
+       bool nade_blast = true;
 
        switch ( self.nade_type )
        {
@@ -484,16 +484,16 @@ void nade_boom()
                        expef = "explosion_medium";
                        break;
                case NADE_TYPE_ICE:
-                       nade_blast = 0;
+                       nade_blast = false;
                        expef = "electro_combo"; // hookbomb_explode electro_combo bigplasma_impact
                        break;
                case NADE_TYPE_TRANSLOCATE:
-                       nade_blast = 0;
+                       nade_blast = false;
                        expef = "";
                        break;
                case NADE_TYPE_MONSTER:
                case NADE_TYPE_SPAWN:
-                       nade_blast = 0;
+                       nade_blast = false;
                        switch(self.realowner.team)
                        {
                                case NUM_TEAM_1: expef = "spawn_event_red"; break;
@@ -504,7 +504,7 @@ void nade_boom()
                        }
                        break;
                case NADE_TYPE_HEAL:
-                       nade_blast = 0;
+                       nade_blast = false;
                        expef = "spawn_event_red";
                        break;
 
@@ -583,7 +583,7 @@ void nade_beep()
        self.nextthink = max(self.wait, time);
 }
 
-void nade_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void nade_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if(ITEM_DAMAGE_NEEDKILL(deathtype))
        {
index dd2d8556d68fe7801111bc60ac0fd987f84ebea2..4963b3c8fe3cbee6a47b33e210e124eba3744ad7 100644 (file)
@@ -45,7 +45,7 @@ void physical_item_touch()
        }
 }
 
-void physical_item_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void physical_item_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if(!self.cnt) // not for dropped items
        if(ITEM_DAMAGE_NEEDKILL(deathtype))
index 53c77ecceefc089e6215e93fd2d9bc771205bc3a..8d061cdb882b8c43521bdc5863beff1ba03eac90 100644 (file)
@@ -430,7 +430,7 @@ void Portal_Remove(entity portal, float killed)
        }
 }
 
-void Portal_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void Portal_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if(deathtype == DEATH_TELEFRAG)
                return;
index 8f9da8b061d581bf609d34c3cf4c9ae84f877ede..f196220f524ae16e9a1ada8cc1d201efe6329fb5 100644 (file)
@@ -180,7 +180,7 @@ void ScoreInfo_SetLabel_TeamScore(float i, string label, float scoreflags)
        }
 }
 
-float ScoreInfo_SendEntity(entity to, float sf)
+float ScoreInfo_SendEntity(entity to, int sf)
 {
        float i;
        WriteByte(MSG_ENTITY, ENT_CLIENT_SCORES_INFO);
index 253c70fbe071eff1be2f03a54c64bd18a7d06b58..91add1a405b8517a7c61bd05133cdbc085ac25d3 100644 (file)
@@ -15,7 +15,7 @@
     #include "race.qh"
 #endif
 
-float SpawnPoint_Send(entity to, float sf)
+float SpawnPoint_Send(entity to, int sf)
 {
        WriteByte(MSG_ENTITY, ENT_CLIENT_SPAWNPOINT);
 
@@ -27,7 +27,7 @@ float SpawnPoint_Send(entity to, float sf)
        return true;
 }
 
-float SpawnEvent_Send(entity to, float sf)
+float SpawnEvent_Send(entity to, int sf)
 {
        float send;
 
index beab71c7ad104db99c7a87a593ce4bcd13191c28..b654d83caf2af105857004642c06701259e7c691 100644 (file)
@@ -3,7 +3,7 @@
 
 .vector spawnpoint_score;
 float spawnpoint_nag;
-float SpawnEvent_Send(entity to, float sf);
+float SpawnEvent_Send(entity to, int sf);
 entity Spawn_FilterOutBadSpots(entity firstspot, float mindist, float teamcheck);
 entity SelectSpawnPoint (float anypoint);
 #endif
index 03af802e71c12d8b762c0e34df606ba8c096ee3d..72e3b09618538e218547b8d76a3dfbd4b5e53ce8 100644 (file)
@@ -229,7 +229,7 @@ void ItemRead(float _IsNew)
 #endif
 
 #ifdef SVQC
-float ItemSend(entity to, float sf)
+bool ItemSend(entity to, int sf)
 {
     if(self.gravity)
         sf |= ISF_DROP;
@@ -925,7 +925,7 @@ float commodity_pickupevalfunc(entity player, entity item)
        return item.bot_pickupbasevalue * c;
 }
 
-void Item_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void Item_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if(ITEM_DAMAGE_NEEDKILL(deathtype))
                RemoveItem();
index bb914234e1c26bf8abfe8d385ce718bc1d36f0de..ae4ecdb769375b17065136d95373c6411a9f7296 100644 (file)
@@ -85,7 +85,7 @@ void ItemRead(float _IsNew);
 #endif
 #ifdef SVQC
 float autocvar_sv_simple_items;
-float ItemSend(entity to, float sf);
+bool ItemSend(entity to, int sf);
 
 
 float have_pickup_item(void);
@@ -126,7 +126,7 @@ void Item_FindTeam();
 // Savage: used for item garbage-collection
 // TODO: perhaps nice special effect?
 
-float ItemSend(entity to, float sf);
+bool ItemSend(entity to, int sf);
 void ItemUpdate(entity item);
 
 // pickup evaluation functions
index 5b9433af4f2aac3cd7c64f73840cf64a75a6c9e1..ebe1676c777d2136074b831d13c4b159d6ad7c58 100644 (file)
@@ -785,7 +785,7 @@ void button_touch()
        button_fire ();
 }
 
-void button_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void button_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if(self.spawnflags & DOOR_NOSPLASH)
                if(!(DEATH_ISSPECIAL(deathtype)) && (deathtype & HITTYPE_SPLASH))
@@ -1145,7 +1145,7 @@ void door_trigger_touch()
 }
 
 
-void door_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void door_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        entity oself;
        if(self.spawnflags & DOOR_NOSPLASH)
@@ -1765,7 +1765,7 @@ void fd_secret_use()
                sound(self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTEN_NORM);
 }
 
-void fd_secret_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void fd_secret_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        fd_secret_use();
 }
index 94bc92f69ceaed1d8af9775bf9de5a4d057269fc..be476d758fec7c264d94a43c996885483ab78e36 100644 (file)
@@ -75,7 +75,7 @@ void TargetMusic_RestoreGame()
 // spawnflags:
 //   1 = START_OFF
 // when triggered, it is disabled/enabled for everyone
-float trigger_music_SendEntity(entity to, float sf)
+float trigger_music_SendEntity(entity to, int sf)
 {
        WriteByte(MSG_ENTITY, ENT_CLIENT_TRIGGER_MUSIC);
        sf &= ~0x80;
index 4c5d95f9e3be472a062abdc3882ce73b1e12a6b5..1cb23e67be79c2a5238fad974e9f294d5b30f337 100644 (file)
@@ -417,7 +417,7 @@ vector turret_stdproc_aim_generic();
 void turret_stdproc_track();
 
 /// Generic damage handeling. blows up the turret when health <= 0
-void turret_stdproc_damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector vforce);
+void turret_stdproc_damage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector vforce);
 /// Spawns a explotion, does some damage & trows bits arround.
 void turret_stdproc_die();
 /// reassembles the turret.
index 45b2e9b3bba68550eb99a4cd59fac4f2c20b87e4..43567fcbfcb48c0442a8090bbd9d4178560c9830 100644 (file)
@@ -81,7 +81,7 @@ void turret_stdproc_respawn()
 /*
 * Standard damage proc.
 */
-void turret_stdproc_damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector vforce)
+void turret_stdproc_damage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector vforce)
 {
     // Enougth allready!
     if(self.deadflag == DEAD_DEAD)
index f2b0c56ce846d596cdd486772c89faa98d3b2160..ad0b68521bb4c03f46991e3cc331e37ea7740cd5 100644 (file)
@@ -15,7 +15,7 @@ void turrets_setframe(float _frame, float client_only)
 
 }
 
-float turret_send(entity to, float sf)
+float turret_send(entity to, int sf)
 {
 
        WriteByte(MSG_ENTITY, ENT_CLIENT_TURRET);
@@ -163,7 +163,7 @@ void turret_projectile_touch()
     turret_projectile_explode();
 }
 
-void turret_projectile_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector vforce)
+void turret_projectile_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector vforce)
 {
     self.velocity  += vforce;
     self.health    -= damage;
@@ -931,7 +931,7 @@ void turret_think()
 
 void turret_fire()
 {
-    if (autocvar_g_turrets_nofire != 0)
+    if (autocvar_g_turrets_nofire)
         return;
 
     self.turret_firefunc();
@@ -991,7 +991,7 @@ void turrets_manager_think()
     self.nextthink = time + 1;
 
     entity e;
-    if (autocvar_g_turrets_reloadcvars == 1)
+    if (autocvar_g_turrets_reloadcvars)
     {
         e = nextent(world);
         while (e)
@@ -1041,19 +1041,6 @@ float turret_stdproc_init (string cvar_base_name, string base, string head, floa
     if (!(self.spawnflags & TSF_SUSPENDED))
         builtin_droptofloor(); // why can't we use regular droptofloor here?
 
-    // Terrainbase spawnflag. This puts a enlongated model
-    // under the turret, so it looks ok on uneaven surfaces.
-    /*  TODO: Handle this with CSQC
-    if (self.spawnflags & TSF_TERRAINBASE)
-    {
-        entity tb;
-        tb = spawn();
-        setmodel(tb,"models/turrets/terrainbase.md3");
-        setorigin(tb,self.origin);
-        tb.solid = SOLID_BBOX;
-    }
-    */
-
     self.cvar_basename = cvar_base_name;
     load_unit_settings(self, self.cvar_basename, 0);
 
index 787510694e9101eca0c0158564170fdf846b5d9f..98eca069e0cb943fbda8b667bfbe17c5b8e709e1 100644 (file)
@@ -133,7 +133,7 @@ float turret_tag_fire_update_s()
 * Railgun-like beam, but has thickness and suppots slowing of target
 */
 void FireImoBeam (vector start, vector end, vector smin, vector smax,
-                  float bforce, float f_dmg, float f_velfactor, float deathtype)
+                  float bforce, float f_dmg, float f_velfactor, int deathtype)
 
 {
     vector hitloc, force, endpoint, dir;
index 4b1c44c1541ca24b8f3da79738db8c1113731e09..f76d119230514283fad3d59447ca2c3488a94b0d 100644 (file)
@@ -56,7 +56,7 @@ void walker_rocket_explode()
     remove (self);
 }
 
-void walker_rocket_damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector vforce)
+void walker_rocket_damage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector vforce)
 {
     self.health = self.health - damage;
     self.velocity = self.velocity + vforce;
index 9b3ae6c31d1b2a75cc5e05f00335150be11d68ee..c9edecf56cbecc190c20963695f47ae6c5f56ffb 100644 (file)
@@ -844,7 +844,7 @@ void spawnfunc_vehicle_bumblebee()
        }
 }
 
-float bumble_raygun_send(entity to, float sf)
+float bumble_raygun_send(entity to, int sf)
 {
        WriteByte(MSG_ENTITY, ENT_CLIENT_BUMBLE_RAYGUN);
 
index 727cbf2a6e5715851fa45a76e1816d68833669c0..16dba7ba2abf859bd1a0720ec185418a4e8e7920 100644 (file)
@@ -78,7 +78,7 @@ vector autocvar_g_vehicle_bumblebee_bouncepain;
 float autocvar_g_vehicle_bumblebee = 0;
 
 
-float bumble_raygun_send(entity to, float sf);
+float bumble_raygun_send(entity to, int sf);
 
 const vector BUMB_MIN = '-130 -130 -130';
 const vector BUMB_MAX = '130 130 130';
@@ -117,7 +117,7 @@ void bumb_spawn(float _f);
 
 void spawnfunc_vehicle_bumblebee();
 
-float bumble_raygun_send(entity to, float sf);
+float bumble_raygun_send(entity to, int sf);
 #endif // SVQC
 
 #ifdef CSQC
index 87dfe52a7e55f2d0a8b94dadbbb4dcacca51653a..dce126c0e986148bc86daecd99fd4ab25ff8cb31 100644 (file)
@@ -239,7 +239,7 @@ void racer_rocket_tracker()
 void racer_fire_rocket(string tagname, entity trg)
 {
     vector v = gettaginfo(self, gettagindex(self, tagname));
-    entity rocket = rocket = vehicles_projectile("wakizashi_rocket_launch", "weapons/rocket_fire.wav",
+    entity rocket = vehicles_projectile("wakizashi_rocket_launch", "weapons/rocket_fire.wav",
                            v, v_forward * autocvar_g_vehicle_racer_rocket_speed,
                            autocvar_g_vehicle_racer_rocket_damage, autocvar_g_vehicle_racer_rocket_radius, autocvar_g_vehicle_racer_rocket_force, 3,
                            DEATH_VH_WAKI_ROCKET, PROJECTILE_WAKIROCKET, 20, false, false, self.owner);
@@ -680,4 +680,4 @@ void spawnfunc_vehicle_racer()
         return;
     }
 }
-#endif // SVQC
+#endif // SVQC
\ No newline at end of file
index 4533da6f3b212701e728cecc2709671df0c7c6ee..4bd28369342b27bf629d165d7b476c203d2833bb 100644 (file)
@@ -345,7 +345,7 @@ void raptor_flare_touch()
     remove(self);
 }
 
-void raptor_flare_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void raptor_flare_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
     self.health -= damage;
     if(self.health <= 0)
index 96d54e3de7bfa832da6a1d6ba8458031389deed8..e29c235199d221f44d6d10cf434192580e1ade34 100644 (file)
@@ -11,7 +11,7 @@ float autocvar_g_vehicles_tag_damagerate = 5;
 
 float autocvar_g_vehicles;
 
-void vehicles_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force);
+void vehicles_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force);
 void vehicles_return();
 void vehicles_enter();
 void vehicles_touch();
@@ -26,7 +26,7 @@ void vehicles_setreturn();
 const float MAX_AXH = 4;
 .entity AuxiliaryXhair[MAX_AXH];
 
-float SendAuxiliaryXhair(entity to, float sf)
+float SendAuxiliaryXhair(entity to, int sf)
 {
 
        WriteByte(MSG_ENTITY, ENT_CLIENT_AUXILIARYXHAIR);
@@ -150,7 +150,7 @@ vector targetdrone_getnewspot()
 
 #if 0
 void targetdrone_think();
-void targetdrone_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force);
+void targetdrone_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force);
 void targetdrone_renwe()
 {
        self.think = targetdrone_think;
@@ -167,7 +167,7 @@ void targetdrone_renwe()
        setsize(self, '-100 -100 -100', '100 100 100');
 
 }
-void targetdrone_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void targetdrone_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        self.health -= damage;
        if(self.health <= 0)
@@ -274,11 +274,11 @@ void vehicles_locktarget(float incr, float decr, float _lock_time)
 
         if(trace_ent.deadflag != DEAD_NO)
             trace_ent = world;
-
-        if(!trace_ent.vehicle_flags & VHF_ISVEHICLE ||
-                               trace_ent.turrcaps_flags & TFL_TURRCAPS_ISTURRET ||
-                               trace_ent.takedamage == DAMAGE_TARGETDRONE)
-            trace_ent = world;
+        if(!(
+            (trace_ent.vehicle_flags & VHF_ISVEHICLE) || 
+            (trace_ent.turrcaps_flags & TFL_TURRCAPS_ISTURRET) || 
+            (trace_ent.takedamage == DAMAGE_TARGETDRONE)
+            )) { trace_ent = world; }
     }
 
     if(self.lock_target == world && trace_ent != world)
@@ -366,7 +366,7 @@ vector vehicles_force_fromtag_maglev(string tag_name, float spring_length, float
 }
 
 // Generic vehile projectile system
-void vehicles_projectile_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void vehicles_projectile_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
     // Ignore damage from oterh projectiles from my owner (dont mess up volly's)
     if(inflictor.owner == self.owner)
@@ -910,7 +910,7 @@ void vehicles_painframe()
     }
 }
 
-void vehicles_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void vehicles_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
     self.dmg_time = time;
 
index c37fce0ab878a2af37b1963a4c42f1cef229398e..5125410b9fa4b7cf2cc26b252bdad5ea13be6478 100644 (file)
@@ -43,7 +43,7 @@ void W_PlayStrengthSound(entity player) // void W_PlayStrengthSound
                player.prevstrengthsoundattempt = time;
 }
 
-float W_CheckProjectileDamage(entity inflictor, entity projowner, float deathtype, float exception)
+float W_CheckProjectileDamage(entity inflictor, entity projowner, int deathtype, float exception)
 {
        float is_from_contents = (deathtype == DEATH_SLIME || deathtype == DEATH_LAVA);
        float is_from_owner = (inflictor == projowner);
index 341f4ff354b44816b7079be2007da282c01fb441..b97457ad99697c017846226b10730a3466e0c6f2 100644 (file)
@@ -5,6 +5,6 @@ void W_GiveWeapon (entity e, float wep);
 .float prevstrengthsound;
 .float prevstrengthsoundattempt;
 void W_PlayStrengthSound(entity player);
-float W_CheckProjectileDamage(entity inflictor, entity projowner, float deathtype, float exception);
+float W_CheckProjectileDamage(entity inflictor, entity projowner, int deathtype, float exception);
 void W_PrepareExplosionByDamage(entity attacker, void() explode);
 #endif
index 773b7f085bea4e9c275501429895d251d176fca6..133e92d3fc9e529cdbe990dea1e7ee2154c749fa 100644 (file)
@@ -13,7 +13,7 @@
 
 .float csqcprojectile_type;
 
-float CSQCProjectile_SendEntity(entity to, int sf)
+bool CSQCProjectile_SendEntity(entity to, int sf)
 {
        float ft, fr;
 
@@ -68,7 +68,7 @@ float CSQCProjectile_SendEntity(entity to, int sf)
        if(sf & 2)
                WriteByte(MSG_ENTITY, self.csqcprojectile_type); // TODO maybe put this into sf?
 
-       return 1;
+       return true;
 }
 
 .vector csqcprojectile_oldorigin;
index c3532d3d67a4cf29bde6541827acb005189ca8f0..1621f8e8e20205aa7cd1f30779aa90d11e6400d5 100644 (file)
@@ -190,7 +190,7 @@ void W_SetupProjVelocity_Explicit(entity proj, vector dir, vector upDir, float p
 //  Ballistics Tracing
 // ====================
 
-void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, float mindist, float maxdist, float halflifedist, float forcehalflifedist, float deathtype)
+void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, float mindist, float maxdist, float halflifedist, float forcehalflifedist, int deathtype)
 {
        vector hitloc, force, endpoint, dir;
        entity ent, endent;
index 1cab448cb087da8bd89bff9243cd6aebdcf78f37..b2ab7d08222d64b81be935e746e31fab99844766 100644 (file)
@@ -50,7 +50,7 @@ void W_SetupProjVelocity_Explicit(entity proj, vector dir, vector upDir, float p
 
 .float railgundistance;
 .vector railgunforce;
-void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, float mindist, float maxdist, float halflifedist, float forcehalflifedist, float deathtype);
+void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, float mindist, float maxdist, float halflifedist, float forcehalflifedist, int deathtype);
 
 float fireBullet_trace_callback_eff;
 entity fireBullet_last_hit;
index c4dc7287f1c182e79ac96e009a8000902678043c..a9380070b7f7f77d57bca408ad03ba5c648bcc0d 100644 (file)
@@ -51,7 +51,7 @@ void WarpZone_TeleportPlayer(entity teleporter, entity player, vector to, vector
        WarpZone_PostTeleportPlayer_Callback(player);
 }
 
-float WarpZone_Teleported_Send(entity to, float sf)
+bool WarpZone_Teleported_Send(entity to, int sf)
 {
        WriteByte(MSG_ENTITY, ENT_CLIENT_WARPZONE_TELEPORTED);
        WriteCoord(MSG_ENTITY, self.angles.x);
@@ -216,7 +216,7 @@ void WarpZone_Touch (void)
        }
 }
 
-float WarpZone_Send(entity to, float sendflags)
+bool WarpZone_Send(entity to, int sendflags)
 {
        WriteByte(MSG_ENTITY, ENT_CLIENT_WARPZONE);
 
@@ -270,7 +270,7 @@ float WarpZone_Send(entity to, float sendflags)
        return true;
 }
 
-float WarpZone_Camera_Send(entity to, float sendflags)
+bool WarpZone_Camera_Send(entity to, int sendflags)
 {
        int f = 0;
        WriteByte(MSG_ENTITY, ENT_CLIENT_WARPZONE_CAMERA);
index 503c23979284e6f796268c6dfbed02b885eec214..37c759a7ed4a117ee4d3a015579ca4802731eea3 100644 (file)
@@ -75,6 +75,7 @@ Ruszkai "CuBe0wL" Ákos
 Severin "sev" Meyer
 
 *Music / Sound FX
+AquaNova (Archer)
 blkrbt
 chooksta
 Independent.nu
@@ -87,7 +88,6 @@ Saulo "mand1nga" Gil
 {SC0RP} - Ian "ID" Dorrell
 Stephan
 unfa
-AquaNova (Archer)
 
 *Game Code
 Samual "Ares" Lenks
@@ -123,6 +123,7 @@ Dale "graphitemaster" Weiler
 
 
 **Other Active Contributors
+BuddyFriendGuy
 Erik "Ablu" Schilling
 Jope "Sless" Withers
 Mircea "Taoki" Kitsune
@@ -133,6 +134,7 @@ Robert "ai" Kuroto
 
 *Asturian
 Llumex03
+Tornes "Tornes.Llume" Ḷḷume
 Ximielga
 
 *Belarusian
@@ -142,8 +144,14 @@ Mihail "meequz" Varantsou
 lokster
 set_killer
 
+*Chinese (China)
+Antonidas
+kalawore
+sapphireliu
+
 *Czech
 shogun assassin/woky
+Superovoce
 Tomáš "CZHeron" Volavka
 
 *Dutch
@@ -152,6 +160,7 @@ PinkRobot
 vegiburger
 
 *English (Australia)
+Laurene "sunflowers" Albrand
 Zac "Mario" Jardine
 
 *Finnish
@@ -173,7 +182,7 @@ Rudolf "divVerent" Polzer
 Yepoleb
 
 *Greek
-Γιάννης "Evropi" Α.
+Γιάννης "Evropi" Ανθυμίδης
 Konstantinos "LDinos" Mihalenas
 Savoritias
 Vindex
@@ -182,9 +191,6 @@ Vindex
 Ruszkai "CuBe0wL" Ákos
 xaN1C4n3
 
-*Japanese
-Lento
-
 *Italian
 Antonio "terencehill" Piu
 Felice "MaidenBeast" Sallustio
@@ -197,10 +203,11 @@ Alex "tiprogrammierer.alex" Progger
 Amadeusz "amade/proraide" Sławiński
 
 *Portuguese
-Ricardo "Hellgardia" Silva
+Ricardo Manuel "Hellgardia" da Cruz Coelho da Silva
 xXxCHAOTICxXx
 
 *Romanian
+Adrian-Ciprian "adrian.tinjala" Tînjală
 BusterDBK
 Mircea "Taoki" Kitsune
 Tudor "TropiKo" Ionel
@@ -218,7 +225,7 @@ Sergej "Clearness High" Lutsyk
 *Serbian
 Саша "salepetronije" Петровић
 Pendulla
-Ristovski
+Rafael "Ristovski"
 
 *Spanish
 0000simon