]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Declare more ints as ints
authorTimePath <andrew.hardaker1995@gmail.com>
Thu, 29 Jan 2015 07:41:08 +0000 (18:41 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Thu, 29 Jan 2015 07:41:08 +0000 (18:41 +1100)
45 files changed:
qcsrc/client/csqcmodel_hooks.qc
qcsrc/client/hud.qc
qcsrc/client/hud.qh
qcsrc/client/scoreboard.qc
qcsrc/client/shownames.qc
qcsrc/client/target_music.qc
qcsrc/client/tturrets.qc
qcsrc/client/view.qc
qcsrc/common/animdecide.qc
qcsrc/common/animdecide.qh
qcsrc/common/buffs.qc
qcsrc/common/buffs.qh
qcsrc/common/campaign_common.qh
qcsrc/common/campaign_file.qc
qcsrc/common/campaign_setup.qc
qcsrc/common/deathtypes.qh
qcsrc/common/mapinfo.qc
qcsrc/common/mapinfo.qh
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/nades.qc
qcsrc/common/notifications.qc
qcsrc/common/notifications.qh
qcsrc/common/playerstats.qc
qcsrc/common/playerstats.qh
qcsrc/common/urllib.qc
qcsrc/common/urllib.qh
qcsrc/common/util.qc
qcsrc/common/weapons/config.qc
qcsrc/common/weapons/weapons.qc
qcsrc/common/weapons/weapons.qh
qcsrc/csqcmodellib/cl_model.qc
qcsrc/csqcmodellib/cl_model.qh
qcsrc/csqcmodellib/cl_player.qc
qcsrc/csqcmodellib/sv_model.qc
qcsrc/dpdefs/csprogsdefs.qh
qcsrc/dpdefs/dpextensions.qh
qcsrc/dpdefs/menudefs.qh
qcsrc/dpdefs/progsdefs.qh
qcsrc/server/cl_player.qc
qcsrc/server/cl_player.qh
qcsrc/server/defs.qh
qcsrc/server/vehicles/bumblebee.qh
qcsrc/server/vehicles/vehicles_def.qh
qcsrc/warpzonelib/mathlib.qc
qcsrc/warpzonelib/mathlib.qh

index d139f589c1e5dafba6ebb529060167db2a4dcd45..dde4461821ee9feef7e501d25961931082a79028 100644 (file)
@@ -16,7 +16,7 @@
        #include "../warpzonelib/mathlib.qh"
 
        .float death_time;
-       .float modelflags;
+       .int modelflags;
 #elif defined(MENUQC)
 #elif defined(SVQC)
 #endif
index e97c89e097c75ce3115e5a98ffb5f228ee0cc614..73eb6f1930e209c97821bdb00026b858f4f9e4b4 100644 (file)
@@ -400,10 +400,9 @@ void HUD_Panel_DrawHighlight(vector pos, vector mySize, vector color, float theA
 // Weapon icons (#0)
 //
 entity weaponorder[WEP_MAXCOUNT];
-void weaponorder_swap(float i, float j, entity pass)
+void weaponorder_swap(int i, int j, entity pass)
 {
-       entity h;
-       h = weaponorder[i];
+       entity h = weaponorder[i];
        weaponorder[i] = weaponorder[j];
        weaponorder[j] = h;
 }
@@ -468,7 +467,7 @@ void HUD_Weapons(void)
        // figure out weapon order (how the weapons are sorted) // TODO make this configurable
        if(weaponorder_bypriority != autocvar_cl_weaponpriority || !weaponorder[0])
        {
-               float weapon_cnt;
+               int weapon_cnt;
                if(weaponorder_bypriority)
                        strunzone(weaponorder_bypriority);
                if(weaponorder_byimpulse)
index d2b225765ab4aea6c596693aa776cb290a4eb291..7da989492fab22e1c3682dcf57f6d4d5d0da21c0 100644 (file)
@@ -349,8 +349,8 @@ HUD_PANELS(HUD_PANEL)
        HUD_Panel_GetBorder();                                                                                          \
 } while(0)
 
-const float NOTIFY_MAX_ENTRIES = 10;
-const float NOTIFY_ICON_MARGIN = 0.02;
+const int NOTIFY_MAX_ENTRIES = 10;
+const int NOTIFY_ICON_MARGIN = 0.02;
 
 int notify_index;
 int notify_count;
index e468514d9cf60c505d89c5a61a16bd281a8298b6..093c96575818360425efc954ffda8ba243800226 100644 (file)
@@ -504,7 +504,8 @@ float hud_field_icon1_alpha;
 float hud_field_icon2_alpha;
 string HUD_GetField(entity pl, int field)
 {
-       float tmp, num, denom, f;
+       float tmp, num, denom;
+       int f;
        string str;
        hud_field_rgb = '1 1 1';
        hud_field_icon0 = "";
@@ -682,7 +683,7 @@ void HUD_PrintScoreboardItem(vector pos, vector item_size, entity pl, float is_s
        vector tmp, rgb;
        rgb = Team_ColorRGB(pl.team);
        string str;
-       float field;
+       int field;
        float is_spec;
        is_spec = (GetPlayerColor(pl.sv_entnum) == NUM_SPECTATOR);
 
@@ -969,7 +970,7 @@ float average_accuracy;
 vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
 {
        int i;
-       float weapon_cnt = WEP_COUNT - 3; // either vaporizer/vortex are hidden, no port-o-launch, no tuba
+       int weapon_cnt = WEP_COUNT - 3; // either vaporizer/vortex are hidden, no port-o-launch, no tuba
        float rows;
        if(autocvar_scoreboard_accuracy_doublerows)
                rows = 2;
index 235756cedd61c6ce1330d6f6dd0caa7fee34218f..ef61bb0cbcc1ae89ffed0fe95752a55d11105884 100644 (file)
@@ -87,7 +87,7 @@ void Draw_ShowNames(entity ent)
                        if(autocvar_hud_shownames_crosshairdistance > crosshairdistance)
                                ent.pointtime = time;
 
-                       if (!(ent.pointtime + autocvar_hud_shownames_crosshairdistance_time > time))
+                       if (ent.pointtime + autocvar_hud_shownames_crosshairdistance_time <= time)
                                overlap = true;
                        else
                                overlap = (autocvar_hud_shownames_crosshairdistance_antioverlap ? overlap : false); // override what antioverlap says unless allowed by cvar.
index 6006aeb479e7c161f0d9488798b18131dd8ebcb4..662a673d7999f901922507b07bc2fe8b974564d3 100644 (file)
@@ -53,17 +53,14 @@ void TargetMusic_Advance()
 
 void Net_TargetMusic()
 {
-       float vol, fai, fao, tim, id;
-       string noi;
-       entity e;
-
-       id = ReadShort();
-       vol = ReadByte() / 255.0;
-       fai = ReadByte() / 16.0;
-       fao = ReadByte() / 16.0;
-       tim = ReadByte();
-       noi = ReadString();
+       int id = ReadShort();
+       float vol = ReadByte() / 255.0;
+       float fai = ReadByte() / 16.0;
+       float fao = ReadByte() / 16.0;
+       float tim = ReadByte();
+       string noi = ReadString();
 
+       entity e;
        for(e = world; (e = findfloat(e, enttype, ENT_CLIENT_TRIGGER_MUSIC)); )
        {
                if(e.count == id)
index 9dbecd3844b9cc53c95632261d9d5b939f7cfb05..50a39b684f19ba5112e5069b45ddc5151827d297 100644 (file)
@@ -668,8 +668,7 @@ void ent_turret()
 
     if(sf & TNSF_STATUS)
     {
-        float _tmp;
-        _tmp = ReadByte();
+        int _tmp = ReadByte();
         if(_tmp != self.team)
         {
             self.team = _tmp;
index 5c7181a1c24df75fddc0237b14f770203dff0c04..4330ecbdc2e24ed7993eb58a0a2ce7054ee52f23 100644 (file)
@@ -986,8 +986,8 @@ void UpdateCrosshair()
        }
 }
 
-const float BUTTON_3 = 4;
-const float BUTTON_4 = 8;
+const int BUTTON_3 = 4;
+const int BUTTON_4 = 8;
 float cl_notice_run();
 float prev_myteam;
 void CSQC_UpdateView(float w, float h)
index f122ca2deaf690f475e216b79f29a084ff1572d9..c457d5ca7fb5bd2c4792f74f60c4120a88c8304a 100644 (file)
@@ -313,7 +313,7 @@ void animdecide_setframes(entity e, float support_blending, .float fld_frame, .f
        }
 }
 
-void animdecide_setstate(entity e, float newstate, float restart)
+void animdecide_setstate(entity e, int newstate, float restart)
 {
        if(!restart)
                if(newstate == e.anim_state)
index c4834793aba4a11ada58621ddb3b4a1ce4130242..885a11608ead9b989c8ccb1431c876db548ac4ef 100644 (file)
@@ -25,7 +25,7 @@ void animdecide_setframes(entity e, bool support_blending, .int fld_frame, .int
 .float anim_upper_implicit_time;
 
 // explicit anim states (networked)
-void animdecide_setstate(entity e, float newstate, float restart);
+void animdecide_setstate(entity e, int newstate, float restart);
 const int ANIMSTATE_DEAD1 = 1; // base frames: die1
 const int ANIMSTATE_DEAD2 = 2; // base frames: die2
 const int ANIMSTATE_DUCK = 4; // turns walk into duckwalk, jump into duckjump, etc.
index 18fbd0f88749af27cd9b1d256a2bb80a56faebd2..cbb40d13de0e37fdd32c843b199ecff0c49aa374 100644 (file)
@@ -9,7 +9,7 @@
     #include "buffs.qh"
 #endif
 
-vector Buff_Color(float buff_id)
+vector Buff_Color(int buff_id)
 {
        entity e;
        for(e = Buff_Type_first; e; e = e.enemy)
@@ -18,7 +18,7 @@ vector Buff_Color(float buff_id)
        return '1 1 1';
 }
 
-string Buff_PrettyName(float buff_id)
+string Buff_PrettyName(int buff_id)
 {
        entity e;
        for(e = Buff_Type_first; e; e = e.enemy)
@@ -27,7 +27,7 @@ string Buff_PrettyName(float buff_id)
        return "";
 }
 
-string Buff_Name(float buff_id)
+string Buff_Name(int buff_id)
 {
        entity e;
        for(e = Buff_Type_first; e; e = e.enemy)
@@ -36,7 +36,7 @@ string Buff_Name(float buff_id)
        return "";
 }
 
-float Buff_Type_FromName(string buff_name)
+int Buff_Type_FromName(string buff_name)
 {
        entity e;
        for(e = Buff_Type_first; e; e = e.enemy)
@@ -45,7 +45,7 @@ float Buff_Type_FromName(string buff_name)
        return 0;
 }
 
-float Buff_Type_FromSprite(string buff_sprite)
+int Buff_Type_FromSprite(string buff_sprite)
 {
        entity e;
        for(e = Buff_Type_first; e; e = e.enemy)
@@ -55,7 +55,7 @@ float Buff_Type_FromSprite(string buff_sprite)
 }
 
 
-float Buff_Skin(float buff_id)
+int Buff_Skin(float buff_id)
 {
        entity e;
        for(e = Buff_Type_first; e; e = e.enemy)
@@ -64,7 +64,7 @@ float Buff_Skin(float buff_id)
        return 0;
 }
 
-string Buff_Sprite(float buff_id)
+string Buff_Sprite(int buff_id)
 {
        entity e;
        for(e = Buff_Type_first; e; e = e.enemy)
index e2dcbae2cff3e78a01134c4f697e0402a1fdbac4..a36ae3f6ce434d275f0975220699e2c3ece00c4d 100644 (file)
@@ -5,17 +5,17 @@ entity Buff_Type_first;
 entity Buff_Type_last;
 .entity enemy; // internal next pointer
 
-float BUFF_LAST = 1;
+int BUFF_LAST = 1;
 
 .int items; // buff ID
 .string netname; // buff name
 .string message; // human readable name
 .vector colormod; // buff color
 .string model2; // buff sprite
-.float skin; // buff skin
+.int skin; // buff skin
 
 #define REGISTER_BUFF(hname,sname,NAME,bskin,bcolor) \
-       float BUFF_##NAME; \
+       int BUFF_##NAME; \
        entity Buff_Type##sname; \
        void RegisterBuffs_##sname() \
        { \
@@ -50,9 +50,9 @@ REGISTER_BUFF(_("Invisible"),invisible,INVISIBLE,12,'0.9 0.9 0.9');
 #undef REGISTER_BUFF
 
 #ifdef SVQC
-.float buffs;
+.int buffs;
 void buff_Init(entity ent);
-void buff_Init_Compat(entity ent, float replacement);
+void buff_Init_Compat(entity ent, int replacement);
 
 #define BUFF_SPAWNFUNC(e,b,t) void spawnfunc_item_buff_##e() { self.buffs = b; self.team = t; buff_Init(self); }
 #define BUFF_SPAWNFUNC_Q3TA_COMPAT(o,r) void spawnfunc_item_##o() { buff_Init_Compat(self,r); }
@@ -87,11 +87,11 @@ BUFF_SPAWNFUNC_Q3TA_COMPAT(invis,   BUFF_INVISIBLE)
 BUFF_SPAWNFUNC_Q3TA_COMPAT(medic,      BUFF_MEDIC)
 #endif
 
-vector Buff_Color(float buff_id);
-string Buff_PrettyName(float buff_id);
-string Buff_Name(float buff_id);
-float Buff_Type_FromName(string buff_name);
-float Buff_Type_FromSprite(string buff_sprite);
-float Buff_Skin(float buff_id);
-string Buff_Sprite(float buff_id);
+vector Buff_Color(int buff_id);
+string Buff_PrettyName(int buff_id);
+string Buff_Name(int buff_id);
+int Buff_Type_FromName(string buff_name);
+int Buff_Type_FromSprite(string buff_sprite);
+int Buff_Skin(int buff_id);
+string Buff_Sprite(int buff_id);
 #endif
\ No newline at end of file
index 01dbeb91911e2f397e72c1e07c77ef259923e39c..21af401494fddb5c4d0d5f15458c1df802db2eff 100644 (file)
@@ -6,8 +6,8 @@
 #endif
 
 // each i-th array element corresponds to the list entry campaign_offset+i
-float campaign_entries;
-float campaign_offset;
+int campaign_entries;
+int campaign_offset;
 string campaign_gametype[CAMPAIGN_MAX_ENTRIES];
 string campaign_mapname[CAMPAIGN_MAX_ENTRIES];
 float campaign_bots[CAMPAIGN_MAX_ENTRIES];
index f1622bda54f81179f07ad062e20c77c4f692e219..27319ec7cca98d2adc1692f767e683ea3cadc14f 100644 (file)
@@ -87,10 +87,10 @@ float CampaignFile_Load(float offset, float n)
 
 void CampaignFile_Unload()
 {
-       float i;
        if(campaign_title)
        {
                strunzone(campaign_title);
+               int i;
                for(i = 0; i < campaign_entries; ++i)
                {
                        strunzone(campaign_gametype[i]);
index 981174f0a068c59661f7fd73a600ee37cf816380..b822c34942a49eece429b68f32e9e43675b6bcdd 100644 (file)
@@ -6,7 +6,7 @@
     #include "mapinfo.qh"
 #endif
 
-void CampaignSetup(float n)
+void CampaignSetup(int n)
 {
        localcmd("set g_campaign 1\n");
        localcmd("set _campaign_name \"");
index 0e6336af60f884d7c7f61a891f45db5e511619d4..0bf387389a42aac266af2c9df4a05a24ea816356 100644 (file)
@@ -118,7 +118,7 @@ DEATHTYPES
 #define DEATH_WEAPONOF(t)             (DEATH_ISSPECIAL(t) ? 0 : DEATH_WEAPONOFWEAPONDEATH(t))
 #define WEP_VALID(w)                  ((w) >= WEP_FIRST && (w) <= WEP_LAST)
 
-string Deathtype_Name(float deathtype)
+string Deathtype_Name(int deathtype)
 {
        if(DEATH_ISSPECIAL(deathtype))
        {
index 90095b1feb5b95ec28b6a380787d44319dbbae7f..914e1dee591a7045f3024859dfe813658e25ae1c 100644 (file)
@@ -17,9 +17,9 @@
 
 // generic string stuff
 
-float _MapInfo_Cache_Active;
-float _MapInfo_Cache_DB_NameToIndex;
-float _MapInfo_Cache_Buf_IndexToMapData;
+int _MapInfo_Cache_Active;
+int _MapInfo_Cache_DB_NameToIndex;
+int _MapInfo_Cache_Buf_IndexToMapData;
 
 void MapInfo_Cache_Destroy()
 {
@@ -1247,7 +1247,7 @@ string MapInfo_FixName(string s)
        return MapInfo_FindName_match;
 }
 
-float MapInfo_CurrentFeatures()
+int MapInfo_CurrentFeatures()
 {
        int req = 0;
        if(!(cvar("g_lms") || cvar("g_instagib") || cvar("g_overkill") || cvar("g_nix") || cvar("g_weaponarena") || !cvar("g_pickup_items") || cvar("g_race") || cvar("g_cts") || cvar("g_nexball")))
@@ -1255,7 +1255,7 @@ float MapInfo_CurrentFeatures()
        return req;
 }
 
-float MapInfo_CurrentGametype()
+int MapInfo_CurrentGametype()
 {
        entity e;
        int prev = cvar("gamecfg");
index 943e81fee573b81a9fd519e27aa995338e358761..03ad44870509c12fe652127d059da3a127c86092 100644 (file)
@@ -1,12 +1,12 @@
 #ifndef MAPINFO_H
 #define MAPINFO_H
 
-float MAPINFO_TYPE_ALL;
+int MAPINFO_TYPE_ALL;
 entity MapInfo_Type_first;
 entity MapInfo_Type_last;
 .entity enemy; // internal next pointer
 
-.float items; // game type ID
+.int items; // game type ID
 .string netname; // game type name as in cvar (with g_ prefix)
 .string mdl; // game type short name
 .string message; // human readable name
index 74f3816f43fe55a9912845c4484dcb1eb85a5480..29209172c6f347065e732d6c9bedf3cb32e4504c 100644 (file)
@@ -283,7 +283,7 @@ float LoadMonsterSounds(string f, float first)
        return 1;
 }
 
-.float skin_for_monstersound;
+.int skin_for_monstersound;
 void UpdateMonsterSounds()
 {
        entity mon = get_monsterinfo(self.monsterid);
index 12a86eedd4b9ea7e8ddaa4d1532e7b11d7e3333b..28a88b6e4f0a63a77cac143eea78a1409a0d2520 100644 (file)
@@ -16,7 +16,7 @@
 
 
 #ifdef SVQC
-float healer_send(entity to, float sf)
+float healer_send(entity to, int sf)
 {
        WriteByte(MSG_ENTITY, ENT_CLIENT_HEALING_ORB);
        WriteByte(MSG_ENTITY, sf);
index 24e20aa75296d7f77a735e292f99de272c7c285d..05c35c744e247bcaf634896b7b8945907cb12436 100644 (file)
@@ -496,8 +496,8 @@ void Create_Notification_Entity(
        int typeId,
        int nameid,
        string namestring,
-       float strnum,
-       float flnum,
+       int strnum,
+       int flnum,
        /* MSG_ANNCE */
        float channel,
        string snd,
@@ -1376,7 +1376,7 @@ void Local_Notification_HUD_Notify_Push(
 
 void Local_Notification_centerprint_generic(
        string input, string durcnt,
-       float cpid, float f1, float f2)
+       int cpid, float f1, float f2)
 {
        string selected;
        float sel_num;
@@ -1425,7 +1425,7 @@ void Local_Notification_centerprint_generic(
 }
 #endif
 
-void Local_Notification(float net_type, float net_name, ...count)
+void Local_Notification(int net_type, int net_name, ...count)
 {
        // check if this should be aborted
        if(net_name == NOTIF_ABORT)
index 60080b187304df2a1e08c1c91ee8800870e5a00f..45d04f44ddce3160a97e85f61a074badf30fe68f 100644 (file)
@@ -54,8 +54,8 @@ void Create_Notification_Entity(
     float typeId,
     float nameid,
     string namestring,
-    float strnum,
-    float flnum,
+    int strnum,
+    int flnum,
     /* MSG_ANNCE */
     float channel,
     string snd,
@@ -86,7 +86,7 @@ void Dump_Notifications(float fh, float alsoprint);
 void Debug_Notification(string input);
 #endif
 
-void Local_Notification(float net_type, float net_name, ...count);
+void Local_Notification(int net_type, int net_name, ...count);
 void Local_Notification_WOVA(
     float net_type, float net_name,
     float stringcount, float floatcount,
@@ -1508,7 +1508,7 @@ float notif_global_error;
 
 #define MSG_MULTI_NOTIF(default,name,anncename,infoname,centername) \
     NOTIF_ADD_AUTOCVAR(name, default) \
-    float name; \
+    int name; \
     void RegisterNotification_##name() \
     { \
         SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_MULTI_COUNT) \
index b885807fad5cf5e8335a7a9b27bd6a10ad0d055f..4a4f63686290f64740ed26d332757d3d93ab6a42 100644 (file)
@@ -109,12 +109,11 @@ float PlayerStats_GameReport_Event(string prefix, string event_id, float value)
 
 void PlayerStats_GameReport_Accuracy(entity p)
 {
-       entity w;
-       float i;
+       int i;
 
        for(i = WEP_FIRST; i <= WEP_LAST; ++i)
        {
-               w = get_weaponinfo(i);
+               entity w = get_weaponinfo(i);
 
                #define ACCMAC(suffix,field) \
                        PS_GR_P_ADDVAL(p, sprintf("acc-%s-%s", w.netname, suffix), p.accuracy.(field[i-1]));
index 50a1409c02ffd19a293dcdba654967ddc3f342b3..e7a187e86f9b90cea47eef42b85f5167ded6df9f 100644 (file)
@@ -3,13 +3,13 @@
 
 #ifdef SVQC
 //float PS_PM_IN_DB = -1;   // playerstats_prematch_in_db      // db for info COLLECTED at the beginning of a match
-float PS_GR_OUT_DB = -1;  // playerstats_gamereport_out_db   // db of info SENT at the end of a match
+int PS_GR_OUT_DB = -1;  // playerstats_gamereport_out_db   // db of info SENT at the end of a match
 //float PS_GR_IN_DB = -1;   // playerstats_gamereport_in_db    // db for info COLLECTED at the end of a match
-float PS_B_IN_DB = -1;    // playerstats_playerbasic_in_db   // db for info COLLECTED for basic player info (ELO)
+int PS_B_IN_DB = -1;    // playerstats_playerbasic_in_db   // db for info COLLECTED for basic player info (ELO)
 #endif
 
 #ifdef MENUQC
-float PS_D_IN_DB = -1; // playerstats_playerdetail_in_db  // db for info COLLECTED for detailed player profile display
+int PS_D_IN_DB = -1; // playerstats_playerdetail_in_db  // db for info COLLECTED for detailed player profile display
 #endif
 
 #ifdef SVQC
index 4176122316648af619d209723b2c21f6d14d86e8..8529ebd6dd52f38bab8fef47ecd3b6fc48b72070 100644 (file)
@@ -28,13 +28,13 @@ const float URL_FH_STDOUT = -2;
 .entity url_ready_pass;
 
 // for multi handles
-.float url_attempt;
-.float url_mode;
+.int url_attempt;
+.int url_mode;
 
 entity url_fromid[NUM_URL_ID];
-float autocvar__urllib_nextslot;
+int autocvar__urllib_nextslot;
 
-float url_URI_Get_Callback(float id, float status, string data)
+float url_URI_Get_Callback(int id, float status, string data)
 {
        if(id < MIN_URL_ID)
                return 0;
@@ -96,7 +96,7 @@ float url_URI_Get_Callback(float id, float status, string data)
        }
 }
 
-void url_single_fopen(string url, float mode, url_ready_func rdy, entity pass)
+void url_single_fopen(string url, int mode, url_ready_func rdy, entity pass)
 {
        entity e;
        int i;
@@ -377,7 +377,7 @@ void url_multi_ready(entity fh, entity me, float status)
        }
        me.url_ready(fh, me.url_ready_pass, status);
 }
-void url_multi_fopen(string url, float mode, url_ready_func rdy, entity pass)
+void url_multi_fopen(string url, int mode, url_ready_func rdy, entity pass)
 {
        float n;
        n = tokenize_console(url);
index 8bc9e8333a62399d4c4fffb28b71be4015b497d1..87dcf8dde110c3e0749f9e549470dac7b6c8cf93 100644 (file)
@@ -14,7 +14,7 @@ string url_fgets(entity e);
 void url_fputs(entity e, string s);
 
 // returns true if handled
-float url_URI_Get_Callback(float id, float status, string data);
+float url_URI_Get_Callback(int id, float status, string data);
 #define MIN_URL_ID URI_GET_URLLIB
 #define NUM_URL_ID (URI_GET_URLLIB_END - URI_GET_URLLIB + 1)
 
index 686fd3bcad9bbd2cf79658e44271e0862849ffd7..5d9997aaa94a29e93e5bc9dcdb6bf43cd9986111 100644 (file)
@@ -303,7 +303,7 @@ int db_create()
        return buf_create();
 }
 
-float db_load(string pFilename)
+int db_load(string pFilename)
 {
        float db, fh, i, j, n;
        string l;
@@ -395,7 +395,7 @@ void db_test()
 }
 
 // Multiline text file buffers
-float buf_load(string pFilename)
+int buf_load(string pFilename)
 {
        float buf, fh, i;
        string l;
@@ -1908,8 +1908,7 @@ string getcurrentmod()
 #ifdef CSQC
 int ReadInt24_t()
 {
-       float v;
-       v = ReadShort() * 256; // note: this is signed
+       int v = ReadShort() * 256; // note: this is signed
        v += ReadByte(); // note: this is unsigned
        return v;
 }
@@ -2363,8 +2362,7 @@ float InterpretBoolean(string input)
 #ifdef CSQC
 entity ReadCSQCEntity()
 {
-       float f;
-       f = ReadShort();
+       int f = ReadShort();
        if(f == 0)
                return world;
        return findfloat(world, entnum, f);
index ed0dc2b93973e88697c01ade41ac216366238ae4..885923e5f786c6bee89254eaa4abe21a6c974a11 100644 (file)
 //  Balance Config Generator
 // ==========================
 
-void W_Config_Queue_Swap(float root, float child, entity pass)
+void W_Config_Queue_Swap(int root, int child, entity pass)
 {
        string oldroot = wep_config_queue[root];
        wep_config_queue[root] = wep_config_queue[child];
        wep_config_queue[child] = oldroot;
 }
 
-float W_Config_Queue_Compare(float root, float child, entity pass)
+float W_Config_Queue_Compare(int root, int child, entity pass)
 {
        return strcmp(wep_config_queue[root], wep_config_queue[child]);
 }
 
 void Dump_Weapon_Settings(void)
 {
-       float i, x, totalsettings = 0;
+       int i, x, totalsettings = 0;
        for(i = WEP_FIRST; i <= WEP_LAST; ++i)
        {
                // step 1: clear the queue
index 627b1fd48357f8a6988f3144fc7d97ade267178f..7b107607d2c01230c27473988c70af7c90527f72 100644 (file)
@@ -344,7 +344,7 @@ string GetAmmoPicture(.float ammotype)
 }
 
 #ifdef CSQC
-.float GetAmmoFieldFromNum(float i)
+.float GetAmmoFieldFromNum(int i)
 {
        switch(i)
        {
@@ -358,7 +358,7 @@ string GetAmmoPicture(.float ammotype)
        }
 }
 
-float GetAmmoStat(.float ammotype)
+int GetAmmoStat(.float ammotype)
 {
        switch(ammotype)
        {
index 1b2b7f7eaec91f23b2e7c9ac9a70026ee089492c..3868ac3e80178e0f1ba818111e22efd7b1a9ee39 100644 (file)
@@ -79,8 +79,8 @@ void W_RandomWeapons(entity e, float n);
 string GetAmmoPicture(.float ammotype);
 
 #ifdef CSQC
-.float GetAmmoFieldFromNum(float i);
-float GetAmmoStat(.float ammotype);
+.float GetAmmoFieldFromNum(int i);
+int GetAmmoStat(.float ammotype);
 #endif
 
 // ammo types
@@ -155,12 +155,12 @@ void register_weapons_done();
 
 // entity properties of weaponinfo:
 // fields which are explicitly/manually set are marked with "M", fields set automatically are marked with "A"
-.float weapon;              // M: WEP_id    // WEP_...
+.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 impulse;               // M: impulse   // weapon impulse
-.float spawnflags;          // M: flags     // WEPSPAWNFLAG_... combined
+.int spawnflags;            // M: flags     // WEPSPAWNFLAG_... combined
 .float bot_pickupbasevalue; // M: rating    // bot weapon priority
 .vector wpcolor;            // M: color     // waypointsprite color
 .string wpmodel;            // A: wpn-id    // wpn- sprite name
@@ -176,7 +176,7 @@ void register_weapons_done();
 
 // note: the fabs call is just there to hide "if result is constant" warning
 #define REGISTER_WEAPON_2(id,bit,function,ammotype,impulse,flags,rating,color,modelname,simplemdl,crosshair,wepimg,refname,wepname) \
-       float id; \
+       int id; \
        WepSet bit; \
        float function(float); \
        void RegisterWeapons_##id() \
index 2139b53e8553a225f4427fb4491e145031c5bf55..6d3542bd0028ad55f84a4c817e4c78b5f6bf1d16 100644 (file)
@@ -213,7 +213,7 @@ void CSQCModel_Draw()
        self.csqcmodel_teleported = 0;
 }
 
-void CSQCModel_Read(float isnew)
+void CSQCModel_Read(bool isnew)
 {
        int sf = ReadInt24_t();
 
index 68547e1b321f5b77d6d234fe41dbad009ec8ded3..c527cc1f2469028be835f524e843061cbe647b21 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "common.qh"
 
-void CSQCModel_Read(float isnew);
+void CSQCModel_Read(bool isnew);
 
 #define CSQCMODEL_IF(cond)
 #define CSQCMODEL_ENDIF
index 69793c2a83af65d19b0531a815033533afeaf5bd..1f3017afdefd64766649fc7636b9602034b718a9 100644 (file)
@@ -40,7 +40,8 @@ float autocvar_cl_movement_errorcompensation = 0;
 float pmove_onground; // weird engine flag we shouldn't really use but have to for now
 
 vector csqcplayer_origin, csqcplayer_velocity;
-float csqcplayer_sequence, player_pmflags;
+float csqcplayer_sequence;
+int player_pmflags;
 float csqcplayer_moveframe;
 vector csqcplayer_predictionerroro;
 vector csqcplayer_predictionerrorv;
index 55ca2ba5f76a34e3a2b41c3161144c255aea94e1..425c985ad6926cb6a060f30e924ec33964e79ddf 100644 (file)
@@ -36,7 +36,7 @@
 
 // generic CSQC model code
 
-float CSQCModel_Send(entity to, float sf)
+float CSQCModel_Send(entity to, int sf)
 {
        // some nice flags for CSQCMODEL_IF
        float isplayer = (IS_CLIENT(self));
index dac4c1651a7fb62a61560676a2663f95937a060f..ad71a02eb80a39ad9d1a81ab0368ce663991976e 100644 (file)
@@ -437,17 +437,17 @@ void(string s) strunzone = #119;
 float(float number, float quantity) bitshift = #218;
 
 //float(string str, string sub[, float startpos]) strstrofs = #221;
-float(string str, string sub, float startpos) strstrofs = #221;
-float(string str, float ofs) str2chr = #222;
-string(float c, ...) chr2str = #223;
+int(string str, string sub, float startpos) strstrofs = #221;
+int(string str, float ofs) str2chr = #222;
+string(int c, ...) chr2str = #223;
 string(float ccase, float calpha, float cnum, string s, ...) strconv = #224;
 string(float chars, string s, ...) strpad = #225;
 string(string info, string key, string value, ...) infoadd = #226;
 string(string info, string key) infoget = #227;
-float(string s1, string s2) strcmp = #228;
-float(string s1, string s2, float len) strncmp = #228;
-float(string s1, string s2) strcasecmp = #229;
-float(string s1, string s2, float len) strncasecmp = #230;
+int(string s1, string s2) strcmp = #228;
+int(string s1, string s2, float len) strncmp = #228;
+int(string s1, string s2) strcasecmp = #229;
+int(string s1, string s2, float len) strncasecmp = #230;
 
 // CSQC range #300-#399
 void() clearscene = #300;
@@ -1218,8 +1218,8 @@ float(float modlindex) skel_create = #263; // create a skeleton (be sure to assi
 float(float skel, entity ent, float modlindex, float retainfrac, float firstbone, float lastbone) skel_build = #264; // blend in a percentage of standard animation, 0 replaces entirely, 1 does nothing, 0.5 blends half, etc, and this only alters the bones in the specified range for which out of bounds values like 0,100000 are safe (uses .frame, .frame2, .frame3, .frame4, .lerpfrac, .lerpfrac3, .lerpfrac4, .frame1time, .frame2time, .frame3time, .frame4time), returns skel on success, 0 on failure
 float(float skel) skel_get_numbones = #265; // returns how many bones exist in the created skeleton, 0 if skeleton does not exist
 string(float skel, float bonenum) skel_get_bonename = #266; // returns name of bone (as a tempstring), "" if invalid bonenum (< 1 for example) or skeleton does not exist
-float(float skel, float bonenum) skel_get_boneparent = #267; // returns parent num for supplied bonenum, 0 if bonenum has no parent or bone does not exist (returned value is always less than bonenum, you can loop on this)
-float(float skel, string tagname) skel_find_bone = #268; // get number of bone with specified name, 0 on failure, bonenum (1-based) on success, same as using gettagindex but takes modelindex instead of entity
+int(float skel, float bonenum) skel_get_boneparent = #267; // returns parent num for supplied bonenum, 0 if bonenum has no parent or bone does not exist (returned value is always less than bonenum, you can loop on this)
+int(float skel, string tagname) skel_find_bone = #268; // get number of bone with specified name, 0 on failure, bonenum (1-based) on success, same as using gettagindex but takes modelindex instead of entity
 vector(float skel, float bonenum) skel_get_bonerel = #269; // get matrix of bone in skeleton relative to its parent - sets v_forward, v_right, v_up, returns origin (relative to parent bone)
 vector(float skel, float bonenum) skel_get_boneabs = #270; // get matrix of bone in skeleton in model space - sets v_forward, v_right, v_up, returns origin (relative to entity)
 void(float skel, float bonenum, vector org) skel_set_bone = #271; // set matrix of bone relative to its parent, reads v_forward, v_right, v_up, takes origin as parameter (relative to parent bone)
index 443d3248badbef568450ad3ab21d7d70b19d98f5..7a7c3cb0f6e998e34ffa238fda2dd78d2a1be48d 100644 (file)
@@ -94,7 +94,7 @@ float(string s) checkextension = #99;
 //idea: LordHavoc
 //darkplaces implementation: LordHavoc
 //effects bit:
-float   EF_ADDITIVE     = 32;
+const int   EF_ADDITIVE     = 32;
 //description:
 //additive blending when this object is rendered
 
@@ -102,7 +102,7 @@ float   EF_ADDITIVE     = 32;
 //idea: id Software
 //darkplaces implementation: LordHavoc
 //effects bit:
-float   EF_BLUE         = 64;
+const int   EF_BLUE         = 64;
 //description:
 //entity emits blue light (used for quad)
 
@@ -110,7 +110,7 @@ float   EF_BLUE         = 64;
 //idea: LordHavoc
 //darkplaces implementation: [515] and LordHavoc
 //effects bit:
-float EF_DOUBLESIDED = 32768;
+const int EF_DOUBLESIDED = 32768;
 //description:
 //render entity as double sided (backfaces are visible, I.E. you see the 'interior' of the model, rather than just the front), can be occasionally useful on transparent stuff.
 
@@ -118,7 +118,7 @@ float EF_DOUBLESIDED = 32768;
 //idea: C.Brutail, divVerent, maikmerten
 //darkplaces implementation: divVerent
 //effects bit:
-float   EF_DYNAMICMODELLIGHT     = 131072;
+const int   EF_DYNAMICMODELLIGHT     = 131072;
 //description:
 //force dynamic model light on the entity, even if it's a BSP model (or anything else with lightmaps or light colors)
 
@@ -126,7 +126,7 @@ float   EF_DYNAMICMODELLIGHT     = 131072;
 //idea: LordHavoc
 //darkplaces implementation: LordHavoc
 //effects bit:
-float   EF_FLAME        = 1024;
+const int   EF_FLAME        = 1024;
 //description:
 //entity is on fire
 
@@ -134,7 +134,7 @@ float   EF_FLAME        = 1024;
 //idea: LordHavoc
 //darkplaces implementation: LordHavoc
 //effects bit:
-float   EF_FULLBRIGHT   = 512;
+const int   EF_FULLBRIGHT   = 512;
 //description:
 //entity is always brightly lit
 
@@ -142,7 +142,7 @@ float   EF_FULLBRIGHT   = 512;
 //idea: Supa
 //darkplaces implementation: LordHavoc
 //effects bit:
-float   EF_NODEPTHTEST       = 8192;
+const int   EF_NODEPTHTEST       = 8192;
 //description:
 //makes entity show up to client even through walls, useful with EF_ADDITIVE for special indicators like where team bases are in a map, so that people don't get lost
 
@@ -150,7 +150,7 @@ float   EF_NODEPTHTEST       = 8192;
 //idea: id Software
 //darkplaces implementation: LordHavoc
 //effects bit:
-float   EF_NODRAW       = 16;
+const int   EF_NODRAW       = 16;
 //description:
 //prevents server from sending entity to client (forced invisible, even if it would have been a light source or other such things)
 
@@ -158,7 +158,7 @@ float   EF_NODRAW       = 16;
 //idea: Chris Page, Dresk
 //darkplaces implementation: LordHAvoc
 //effects bit:
-float   EF_NOGUNBOB     = 256;
+const int   EF_NOGUNBOB     = 256;
 //description:
 //this has different meanings depending on the entity it is used on:
 //player entity - prevents gun bobbing on player.viewmodel
@@ -172,7 +172,7 @@ float   EF_NOGUNBOB     = 256;
 //idea: LordHavoc
 //darkplaces implementation: LordHavoc
 //effects bit:
-float   EF_NOSHADOW     = 4096;
+const int   EF_NOSHADOW     = 4096;
 //description:
 //realtime lights will not cast shadows from this entity (but can still illuminate it)
 
@@ -180,7 +180,7 @@ float   EF_NOSHADOW     = 4096;
 //idea: id Software
 //darkplaces implementation: LordHavoc
 //effects bit:
-float   EF_RED          = 128;
+const int   EF_RED          = 128;
 //description:
 //entity emits red light (used for invulnerability)
 
@@ -188,7 +188,7 @@ float   EF_RED          = 128;
 //idea: id software
 //darkplaces implementation: divVerent
 //effects bit:
-float   EF_RESTARTANIM_BIT = 1048576;
+const int   EF_RESTARTANIM_BIT = 1048576;
 //description:
 //when toggled, the current animation is restarted. Useful for weapon animation.
 //to toggle this bit in QC, you can do:
@@ -198,7 +198,7 @@ float   EF_RESTARTANIM_BIT = 1048576;
 //idea: MythWorks Inc
 //darkplaces implementation: LordHavoc
 //effects bit:
-float   EF_STARDUST     = 2048;
+const int   EF_STARDUST     = 2048;
 //description:
 //entity emits bouncing sparkles in every direction
 
@@ -206,7 +206,7 @@ float   EF_STARDUST     = 2048;
 //idea: id software
 //darkplaces implementation: divVerent
 //effects bit:
-float   EF_TELEPORT_BIT = 2097152;
+const int   EF_TELEPORT_BIT = 2097152;
 //description:
 //when toggled, interpolation of the entity is skipped for one frame. Useful for teleporting.
 //to toggle this bit in QC, you can do:
@@ -874,7 +874,7 @@ vector(entity e, float s, float n) getsurfacetriangle = #629;
 //idea: VorteX, LordHavoc
 //DarkPlaces implementation: VorteX
 //builtin definitions:
-float(entity ent, string tagname) gettagindex = #451;
+int(entity ent, string tagname) gettagindex = #451;
 vector(entity ent, float tagindex) gettaginfo = #452;
 //description:
 //gettagindex returns the number of a tag on an entity, this number is the same as set by setattachment (in the .tag_index field), allowing the qc to save a little cpu time by keeping the number around if it wishes (this could already be done by calling setattachment and saving off the tag_index).
@@ -1085,7 +1085,7 @@ string(string s) strtoupper = #481; // returns the passed in string in pure uppe
 //idea: Electro, SavageX, LordHavoc
 //darkplaces implementation: LordHavoc
 //builtin definitions:
-float(string s, string separator1, ...) tokenizebyseparator = #479;
+int(string s, string separator1, ...) tokenizebyseparator = #479;
 //description:
 //this function returns tokens separated by any of the supplied separator strings, example:
 //numnumbers = tokenizebyseparator("10.2.3.4", ".");
@@ -1096,9 +1096,9 @@ float(string s, string separator1, ...) tokenizebyseparator = #479;
 //idea: divVerent
 //darkplaces implementation: divVerent
 //builtin definitions:
-float(string s) tokenize_console = #514;
-float(float i) argv_start_index = #515;
-float(float i) argv_end_index = #516;
+int(string s) tokenize_console = #514;
+int(float i) argv_start_index = #515;
+int(float i) argv_end_index = #516;
 //description:
 //this function returns tokens separated just like the console does
 //also, functions are provided to get the index of the first and last character of each token in the original string
@@ -1577,7 +1577,7 @@ void(vector origin, string sample, float volume, float attenuation) pointsound =
 //idea: LordHavoc, Dresk
 //darkplaces implementation: LordHavoc
 //field definitions:
-.float modelflags;
+.int modelflags;
 //constant definitions:
 float EF_NOMODELFLAGS = 8388608; // ignore any effects in a model file and substitute your own
 float MF_ROCKET  =   1; // leave a trail
@@ -1638,7 +1638,7 @@ float MF_TRACER3 = 128; // purple trail
 //idea: Spike
 //darkplaces implementation: LordHavoc
 //function definitions:
-float(string effectname) particleeffectnum = #335; // same as in CSQC
+int(string effectname) particleeffectnum = #335; // same as in CSQC
 void(entity ent, float effectnum, vector start, vector end) trailparticles = #336; // same as in CSQC
 void(float effectnum, vector org, vector vel, float howmany) pointparticles = #337; // same as in CSQC
 //SVC definitions:
@@ -2110,7 +2110,7 @@ float(string filename, float mode) fopen = #110; // opens a file inside quake/ga
 void(float fhandle) fclose = #111; // closes a file
 string(float fhandle) fgets = #112; // reads a line of text from the file and returns as a tempstring
 void(float fhandle, string s, ...) fputs = #113; // writes a line of text to the end of the file
-float(string s) strlen = #114; // returns how many characters are in a string
+int(string s) strlen = #114; // returns how many characters are in a string
 string(string s1, string s2, ...) strcat = #115; // concatenates two or more strings (for example "abc", "def" would return "abcdef") and returns as a tempstring
 string(string s, float start, float length) substring = #116; // returns a section of a string as a tempstring - see FTE_STRINGS for enhanced version
 vector(string s) stov = #117; // returns vector value from a string
@@ -2311,7 +2311,7 @@ void() example_skel_player_delete =
 //void(string s) SV_ParseClientCommand;
 //builtin definitions:
 void(entity e, string s) clientcommand = #440;
-float(string s) tokenize = #441;
+int(string s) tokenize = #441;
 string(float n) argv = #442;
 //description:
 //provides QC the ability to completely control server interpretation of client commands ("say" and "color" for example, clientcommand is necessary for this and substring (FRIK_FILE) is useful) as well as adding new commands (tokenize, argv, and stof (FRIK_FILE) are useful for this)), whenever a clc_stringcmd is received the QC function is called, and it is up to the QC to decide what (if anything) to do with it
@@ -2377,7 +2377,7 @@ float EF_SELECTABLE = 16384; // allows cursor to highlight entity (brighten)
 .float style; // light style (like normal light entities, flickering torches or switchable, etc)
 .float pflags; // flags (see PFLAGS_ constants)
 .vector angles; // orientation of the light
-.float skin; // cubemap filter number, can be 1-255 (0 is assumed to be none, and tenebrae only allows 16-255), this selects a projective light filter, a value of 1 loads cubemaps/1posx.tga and cubemaps/1negx.tga and posy, negy, posz, and negz, similar to skybox but some sides need to be rotated or flipped
+.int skin; // cubemap filter number, can be 1-255 (0 is assumed to be none, and tenebrae only allows 16-255), this selects a projective light filter, a value of 1 loads cubemaps/1posx.tga and cubemaps/1negx.tga and posy, negy, posz, and negz, similar to skybox but some sides need to be rotated or flipped
 //constants:
 float PFLAGS_NOSHADOW = 1; // light does not cast shadows
 float PFLAGS_CORONA = 2; // light has a corona flare
@@ -2411,16 +2411,16 @@ float checkpvs(vector viewpos, entity viewee) = #240;
 //darkplaces implementation: KrimZon
 //builtin definitions:
 int(string str, string sub, float startpos) strstrofs = #221; // returns the offset into a string of the matching text, or -1 if not found, case sensitive
-float(string str, float ofs) str2chr = #222; // returns the character at the specified offset as an integer, or 0 if an invalid index, or byte value - 256 if the engine supports UTF8 and the byte is part of an extended character
-string(float c, ...) chr2str = #223; // returns a string representing the character given, if the engine supports UTF8 this may be a multi-byte sequence (length may be more than 1) for characters over 127.
+int(string str, float ofs) str2chr = #222; // returns the character at the specified offset as an integer, or 0 if an invalid index, or byte value - 256 if the engine supports UTF8 and the byte is part of an extended character
+string(int c, ...) chr2str = #223; // returns a string representing the character given, if the engine supports UTF8 this may be a multi-byte sequence (length may be more than 1) for characters over 127.
 string(float ccase, float calpha, float cnum, string s, ...) strconv = #224; // reformat a string with special color characters in the font, DO NOT USE THIS ON UTF8 ENGINES (if you are lucky they will emit ^4 and such color codes instead), the parameter values are 0=same/1=lower/2=upper for ccase, 0=same/1=white/2=red/5=alternate/6=alternate-alternate for redalpha, 0=same/1=white/2=red/3=redspecial/4=whitespecial/5=alternate/6=alternate-alternate for rednum.
 string(float chars, string s, ...) strpad = #225; // pad string with spaces to a specified length, < 0 = left padding, > 0 = right padding
 string(string info, string key, string value, ...) infoadd = #226; // sets or adds a key/value pair to an infostring - note: forbidden characters are \ and "
 string(string info, string key) infoget = #227; // gets a key/value pair in an infostring, returns value or null if not found
-float(string s1, string s2) strcmp = #228; // compare two strings
-float(string s1, string s2, float len) strncmp = #228; // compare two strings up to the specified number of characters, if their length differs and is within the specified limit the result will be negative, otherwise it is the difference in value of their first non-matching character.
-float(string s1, string s2) strcasecmp = #229; // compare two strings with case-insensitive matching, characters a-z are considered equivalent to the matching A-Z character, no other differences, and this does not consider special characters equal even if they look similar
-float(string s1, string s2, float len) strncasecmp = #230; // same as strcasecmp but with a length limit, see strncmp
+int(string s1, string s2) strcmp = #228; // compare two strings
+int(string s1, string s2, float len) strncmp = #228; // compare two strings up to the specified number of characters, if their length differs and is within the specified limit the result will be negative, otherwise it is the difference in value of their first non-matching character.
+int(string s1, string s2) strcasecmp = #229; // compare two strings with case-insensitive matching, characters a-z are considered equivalent to the matching A-Z character, no other differences, and this does not consider special characters equal even if they look similar
+int(string s1, string s2, float len) strncasecmp = #230; // same as strcasecmp but with a length limit, see strncmp
 //string(string s, float start, float length) substring = #116; // see note below
 //description:
 //various string manipulation functions
index 99d88ba2ce7f9c01b064c986fbe6857d4765ef9f..7ef71010619be6a20c6957a65d6814f25a309df9 100644 (file)
@@ -385,17 +385,17 @@ vector gecko_get_texture_extent( string name ) = #493;
 //darkplaces implementation: KrimZon
 //description:
 //various string manipulation functions
-float(string str, string sub, float startpos) strstrofs = #221;
-float(string str, float ofs) str2chr = #222;
-string(float c, ...) chr2str = #223;
+int(string str, string sub, float startpos) strstrofs = #221;
+int(string str, float ofs) str2chr = #222;
+string(int c, ...) chr2str = #223;
 string(float ccase, float calpha, float cnum, string s, ...) strconv = #224;
 string(float chars, string s, ...) strpad = #225;
 string(string info, string key, string value, ...) infoadd = #226;
 string(string info, string key) infoget = #227;
-float(string s1, string s2) strcmp = #228;
-float(string s1, string s2, float len) strncmp = #228;
-float(string s1, string s2) strcasecmp = #229;
-float(string s1, string s2, float len) strncasecmp = #230;
+int(string s1, string s2) strcmp = #228;
+int(string s1, string s2, float len) strncmp = #228;
+int(string s1, string s2) strcasecmp = #229;
+int(string s1, string s2, float len) strncasecmp = #230;
 
 //DP_PRECACHE_PIC_FLAGS
 //idea: divVerent
index 0064060a4b6ed135766a500aa0d226a2faa04317..de39d64a6391ee385728d8427b426c7042121067 100644 (file)
@@ -33,7 +33,7 @@ float         deathmatch;
 float          coop;
 float          teamplay;
 
-float          serverflags;            // propagated from level to level, used to
+int                    serverflags;            // propagated from level to level, used to
                                                                // keep track of completed episodes
 
 float          total_secrets;
@@ -122,8 +122,8 @@ void                end_sys_globals;                // flag for structure dumping
 .string                classname;              // spawn function
 .string                model;
 .float         frame;
-.float         skin;
-.float         effects;
+.int           skin;
+.int           effects;
 
 .vector                mins, maxs;             // bounding box extents reletive to origin
 .vector                size;                   // maxs - mins
@@ -139,13 +139,13 @@ void              end_sys_globals;                // flag for structure dumping
 // stats
 .float         health;
 .float         frags;
-.float         weapon;                 // one of the IT_SHOTGUN, etc flags
+.int           weapon;                 // one of the IT_SHOTGUN, etc flags
 .string                weaponmodel;
 .float         weaponframe;
 .float         currentammo;
 .float         ammo_shells, ammo_nails, ammo_rockets, ammo_cells;
 
-.float         items;                  // bit flags
+.int           items;                  // bit flags
 
 .float         takedamage;
 .entity                chain;
@@ -169,9 +169,9 @@ void                end_sys_globals;                // flag for structure dumping
 
 .entity        enemy;
 
-.float         flags;
+.int           flags;
 
-.float         colormap;
+.int           colormap;
 .float         team;
 
 .float         max_health;             // players maximum health is stored here
@@ -191,7 +191,7 @@ void                end_sys_globals;                // flag for structure dumping
 
 .entity        goalentity;             // a movetarget or an enemy
 
-.float         spawnflags;
+.int           spawnflags;
 
 .string                target;
 .string                targetname;
index 8ba66f78d0cf31bf1e7f8230b016a3c06c6e7902..bd5109fb3c4eda3e08d10549693de8b256bd62b3 100644 (file)
@@ -118,7 +118,7 @@ void player_setupanimsformodel()
 
 void player_anim (void)
 {
-       float deadbits = (self.anim_state & (ANIMSTATE_DEAD1 | ANIMSTATE_DEAD2));
+       int deadbits = (self.anim_state & (ANIMSTATE_DEAD1 | ANIMSTATE_DEAD2));
        if(self.deadflag) {
                if (!deadbits) {
                        // Decide on which death animation to use.
@@ -131,7 +131,7 @@ void player_anim (void)
                // Clear a previous death animation.
                deadbits = 0;
        }
-       float animbits = deadbits;
+       int animbits = deadbits;
        if(self.frozen)
                animbits |= ANIMSTATE_FROZEN;
        if(self.crouch)
index 6f2aceec3a0e025ccaa2f32d725364823f0675bf..4479f98c871331a4c560518cbfbf05cc55c5811f 100644 (file)
@@ -59,8 +59,8 @@ void ClearPlayerSounds();
 
 float LoadPlayerSounds(string f, float first);
 
-.float modelindex_for_playersound;
-.float skin_for_playersound;
+.int modelindex_for_playersound;
+.int skin_for_playersound;
 void UpdatePlayerSounds();
 
 void FakeGlobalSound(string sample, float chan, float voicetype);
index f8e8952f98ea1afaaf07a6cd4b8f1da1733e7c8a..c49af0d8f21fa3760a11f05ca64ee6696182fefc 100644 (file)
@@ -182,7 +182,7 @@ const float MAX_DAMAGEEXTRARADIUS = 16;
 .entity exteriorweaponentity;
 .vector weaponentity_glowmod;
 
-//.float weapon; // current weapon
+//.int weapon; // current weapon
 .float switchweapon; // weapon requested to switch to
 .float switchingweapon; // weapon currently being switched to (is copied from switchweapon once switch is possible)
 .string weaponname; // name of .weapon
@@ -346,7 +346,7 @@ float tracebox_hits_trigger_hurt(vector start, vector mi, vector ma, vector end)
 float next_pingtime;
 
 .float Version;
-.float SendFlags;
+.int SendFlags;
 .float(entity to, float sendflags) SendEntity;
 
 // player sounds, voice messages
index 132f1f02d978538fc3a1573cce53cb737c7a2c80..18d90aa3ba3467133eea5bec14e9963c4a991b23 100644 (file)
@@ -1,9 +1,9 @@
 #ifndef BUMBLEBEE_H
 #define BUMBLEBEE_H
 
-const float BRG_SETUP = 2;
-const float BRG_START = 4;
-const float BRG_END = 8;
+const int BRG_SETUP = 2;
+const int BRG_START = 4;
+const int BRG_END = 8;
 
 #ifdef SVQC
 // Auto cvars
index 1e3cff4cda3a3ca19e84289d75187c17a3c014ff..6a55456ab69cd7e31df7fe3772b11aba98b18e3e 100644 (file)
@@ -7,21 +7,21 @@
 #define VEHICLES_ENABLED
 #ifdef VEHICLES_ENABLED
 
-.float vehicle_flags;
-const float VHF_ISVEHICLE     = 2;    /// Indicates vehicle
-const float VHF_HASSHIELD     = 4;    /// Vehicle has shileding
-const float VHF_SHIELDREGEN   = 8;    /// Vehicles shield regenerates
-const float VHF_HEALTHREGEN   = 16;   /// Vehicles health regenerates
-const float VHF_ENERGYREGEN   = 32;   /// Vehicles energy regenerates
-const float VHF_DEATHEJECT    = 64;   /// Vehicle ejects pilot upon fatal damage
-const float VHF_MOVE_GROUND   = 128;  /// Vehicle moves on gound
-const float VHF_MOVE_HOVER    = 256;  /// Vehicle hover close to gound
-const float VHF_MOVE_FLY      = 512;  /// Vehicle is airborn
-const float VHF_DMGSHAKE      = 1024; /// Add random velocity each frame if health < 50%
-const float VHF_DMGROLL       = 2048; /// Add random angles each frame if health < 50%
-const float VHF_DMGHEADROLL   = 4096; /// Add random head angles each frame if health < 50%
-const float VHF_MULTISLOT     = 8192; /// Vehicle has multiple player slots
-const float VHF_PLAYERSLOT    = 16384;    /// This ent is a player slot on a multi-person vehicle
+.int vehicle_flags;
+const int VHF_ISVEHICLE     = 2;    /// Indicates vehicle
+const int VHF_HASSHIELD     = 4;    /// Vehicle has shileding
+const int VHF_SHIELDREGEN   = 8;    /// Vehicles shield regenerates
+const int VHF_HEALTHREGEN   = 16;   /// Vehicles health regenerates
+const int VHF_ENERGYREGEN   = 32;   /// Vehicles energy regenerates
+const int VHF_DEATHEJECT    = 64;   /// Vehicle ejects pilot upon fatal damage
+const int VHF_MOVE_GROUND   = 128;  /// Vehicle moves on gound
+const int VHF_MOVE_HOVER    = 256;  /// Vehicle hover close to gound
+const int VHF_MOVE_FLY      = 512;  /// Vehicle is airborn
+const int VHF_DMGSHAKE      = 1024; /// Add random velocity each frame if health < 50%
+const int VHF_DMGROLL       = 2048; /// Add random angles each frame if health < 50%
+const int VHF_DMGHEADROLL   = 4096; /// Add random head angles each frame if health < 50%
+const int VHF_MULTISLOT     = 8192; /// Vehicle has multiple player slots
+const int VHF_PLAYERSLOT    = 16384;    /// This ent is a player slot on a multi-person vehicle
 
 .entity gun1;
 .entity gun2;
index b45c22a21ff210e785ac88827bafc337bb6320c1..8dd9684e52dd70ece4016da89c6ceb659e81ab8d 100644 (file)
@@ -18,25 +18,25 @@ int fpclassify(float x)
                return FP_ZERO;
        return FP_NORMAL;
 }
-int isfinite(float x)
+bool isfinite(float x)
 {
        return !(isnan(x) || isinf(x));
 }
-int isinf(float x)
+bool isinf(float x)
 {
        return (x != 0) && (x + x == x);
 }
-int isnan(float x)
+bool isnan(float x)
 {
        float y;
        y = x;
        return (x != y);
 }
-int isnormal(float x)
+bool isnormal(float x)
 {
        return isfinite(x);
 }
-int signbit(float x)
+bool signbit(float x)
 {
        return (x < 0);
 }
index 6d1e488dc8f121b81d15652c22a1dd4481d2984d..659f437763db58bf3e376d791fd8d55c9fdef68b 100644 (file)
@@ -6,17 +6,17 @@
 // The commented-out functions need no implementation because DarkPlaces offers
 // them as builtins. They are listed here anyway for completeness sake.
 
-const float FP_NAN = 0;
-const float FP_INFINITE = 1;
-const float FP_ZERO = 2;
-const float FP_SUBNORMAL = 3;
-const float FP_NORMAL = 4;
+const int FP_NAN = 0;
+const int FP_INFINITE = 1;
+const int FP_ZERO = 2;
+const int FP_SUBNORMAL = 3;
+const int FP_NORMAL = 4;
 int fpclassify(float x);
-int isfinite(float x);
-int isinf(float x);
-int isnan(float x);
-int isnormal(float x);
-int signbit(float x);
+bool isfinite(float x);
+bool isinf(float x);
+bool isnan(float x);
+bool isnormal(float x);
+bool signbit(float x);
 
 //float acos(float x);
 //float asin(float x);