Declare more ints as ints
authorTimePath <andrew.hardaker1995@gmail.com>
Thu, 29 Jan 2015 10:35:33 +0000 (21:35 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Thu, 29 Jan 2015 10:35:33 +0000 (21:35 +1100)
19 files changed:
qcsrc/client/casings.qc
qcsrc/client/hud.qc
qcsrc/client/hud.qh
qcsrc/client/hud_config.qc
qcsrc/client/main.qc
qcsrc/client/mapvoting.qc
qcsrc/client/mapvoting.qh
qcsrc/client/movetypes.qc
qcsrc/client/movetypes.qh
qcsrc/client/teamradar.qc
qcsrc/common/command/rpn.qh
qcsrc/common/csqcmodel_settings.qh
qcsrc/common/notifications.qc
qcsrc/common/util.qc
qcsrc/common/weapons/w_arc.qc
qcsrc/common/weapons/weapons.qc
qcsrc/csqcmodellib/common.qh
qcsrc/dpdefs/dpextensions.qh
qcsrc/dpdefs/progsdefs.qh

index bd6053e..6c14fc3 100644 (file)
@@ -5,7 +5,7 @@
 
        .float cnt;
        .float alpha;
-       .float state;
+       .int state;
 #elif defined(MENUQC)
 #elif defined(SVQC)
 #endif
index a33a851..e88c250 100644 (file)
@@ -240,7 +240,7 @@ float race_CheckName(string net_name) {
        return 0;
 }
 
-float GetPlayerColorForce(float i)
+float GetPlayerColorForce(int i)
 {
        if(!teamplay)
                return 0;
@@ -248,7 +248,7 @@ float GetPlayerColorForce(float i)
                return stof(getplayerkeyvalue(i, "colors")) & 15;
 }
 
-float GetPlayerColor(float i)
+float GetPlayerColor(int i)
 {
        if(!playerslots[i].gotscores) // unconnected
                return NUM_SPECTATOR;
@@ -258,7 +258,7 @@ float GetPlayerColor(float i)
                return GetPlayerColorForce(i);
 }
 
-string GetPlayerName(float i)
+string GetPlayerName(int i)
 {
        return ColorTranslateRGB(getplayerkeyvalue(i, "name"));
 }
index 7da9894..167fd21 100644 (file)
@@ -101,7 +101,7 @@ string panel_bg_padding_str;
 
 float current_player;
 
-float GetPlayerColorForce(float i);
+float GetPlayerColorForce(int i);
 
 
 #define HUD_PANELS(HUD_PANEL)                                                                                                                                                                          \
@@ -255,7 +255,7 @@ HUD_PANELS(HUD_PANEL)
        } else {                                                                                                        \
                panel_bg_padding = stof(panel_bg_padding_str);                                                              \
        }                                                                                                               \
-       panel_bg_padding = min(min(panel_size_x, panel_size_y)/2 - 5, panel_bg_padding);                                \
+       panel_bg_padding = min(min(panel_size.x, panel_size.y)/2 - 5, panel_bg_padding);                                \
 } while(0)
 
 // return smoothly faded pos and size of given panel when a dialog is active
@@ -264,28 +264,28 @@ HUD_PANELS(HUD_PANEL)
        vector menu_enable_size = '0 0 0';                                                                              \
        float menu_enable_maxsize_x = 0.3 * vid_conwidth;                                                               \
        float menu_enable_maxsize_y = 0.18 * vid_conheight;                                                             \
-       if (panel_size_x > panel_size_y) {                                                                              \
-               if (panel_size_y > menu_enable_maxsize_y) {                                                                 \
-                       menu_enable_size_y = menu_enable_maxsize_y;                                                             \
-                       menu_enable_size_x = panel_size_x * (menu_enable_maxsize_y/panel_size_y);                               \
+       if (panel_size.x > panel_size.y) {                                                                              \
+               if (panel_size.y > menu_enable_maxsize_y) {                                                                 \
+                       menu_enable_size.y = menu_enable_maxsize_y;                                                             \
+                       menu_enable_size.x = panel_size.x * (menu_enable_maxsize_y/panel_size.y);                               \
                        panel_size = (1 - autocvar__menu_alpha) * panel_size + (autocvar__menu_alpha) * menu_enable_size;       \
                }                                                                                                           \
-               menu_enable_pos = eX * 0.5 * vid_conwidth - eX * 0.5 * panel_size_x + eY * (vid_conheight - menu_enable_maxsize_y);\
+               menu_enable_pos = eX * 0.5 * vid_conwidth - eX * 0.5 * panel_size.x + eY * (vid_conheight - menu_enable_maxsize_y);\
        } else {                                                                                                        \
-               if (panel_size_x > menu_enable_maxsize_x) {                                                                 \
-                       menu_enable_size_x = menu_enable_maxsize_x;                                                             \
-                       menu_enable_size_y = panel_size_y * (menu_enable_maxsize_x/panel_size_x);                               \
+               if (panel_size.x > menu_enable_maxsize_x) {                                                                 \
+                       menu_enable_size.x = menu_enable_maxsize_x;                                                             \
+                       menu_enable_size.y = panel_size.y * (menu_enable_maxsize_x/panel_size.x);                               \
                        panel_size = (1 - autocvar__menu_alpha) * panel_size + (autocvar__menu_alpha) * menu_enable_size;       \
                }                                                                                                           \
-               menu_enable_pos = eY * 0.5 * vid_conheight - eY * 0.5 * panel_size_y + eX * (vid_conwidth - menu_enable_maxsize_x);\
+               menu_enable_pos = eY * 0.5 * vid_conheight - eY * 0.5 * panel_size.y + eX * (vid_conwidth - menu_enable_maxsize_x);\
        }                                                                                                               \
        panel_pos = (1 - autocvar__menu_alpha) * panel_pos + (autocvar__menu_alpha) * menu_enable_pos;                  \
 } while(0)
 
 // Scale the pos and size vectors to absolute coordinates
 #define HUD_Panel_ScalePosSize() do {                                                                               \
-       panel_pos_x *= vid_conwidth;  panel_pos_y *= vid_conheight;                                                     \
-       panel_size_x *= vid_conwidth; panel_size_y *= vid_conheight;                                                    \
+       panel_pos.x *= vid_conwidth;  panel_pos.y *= vid_conheight;                                                     \
+       panel_size.x *= vid_conwidth; panel_size.y *= vid_conheight;                                                    \
 } while(0)
 
 // NOTE: in hud_configure mode cvars must be reloaded every frame
@@ -350,7 +350,7 @@ HUD_PANELS(HUD_PANEL)
 } while(0)
 
 const int NOTIFY_MAX_ENTRIES = 10;
-const int NOTIFY_ICON_MARGIN = 0.02;
+const float NOTIFY_ICON_MARGIN = 0.02;
 
 int notify_index;
 int notify_count;
index 0f4d932..898f3eb 100644 (file)
@@ -61,7 +61,7 @@ void HUD_Panel_ExportCfg(string cfgname)
                HUD_Write("\n");
 
                // common cvars for all panels
-               float i;
+               int i;
                for (i = 0; i < HUD_PANEL_NUM; ++i)
                {
                        panel = hud_panel[i];
@@ -324,14 +324,10 @@ void HUD_Panel_SetPos(vector pos)
 
 // check if resize will result in panel being moved into another panel. If so, return snapped vector, otherwise return the given vector
 vector HUD_Panel_CheckResize(vector mySize, vector resizeorigin) {
-       float i;
-
        vector targEndPos;
-
        vector dist;
-       float ratio;
-       ratio = mySize.x/mySize.y;
-
+       float ratio = mySize.x/mySize.y;
+       int i;
        for (i = 0; i < HUD_PANEL_NUM; ++i) {
                panel = hud_panel[i];
                if(panel == highlightedPanel) continue;
@@ -687,11 +683,12 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
        con_keys = findkeysforcommand("toggleconsole", 0);
        keys = tokenize(con_keys); // findkeysforcommand returns data for this
 
-       float hit_con_bind = 0, i;
+       bool hit_con_bind = false;
+       int i;
        for (i = 0; i < keys; ++i)
        {
                if(nPrimary == stof(argv(i)))
-                       hit_con_bind = 1;
+                       hit_con_bind = true;
        }
 
        if(bInputType == 0) {
@@ -930,8 +927,7 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
 
 float HUD_Panel_Check_Mouse_Pos(float allow_move)
 {
-       float i, j = 0, border;
-
+       int i, j = 0;
        while(j < HUD_PANEL_NUM)
        {
                i = panel_order[j];
@@ -940,7 +936,7 @@ float HUD_Panel_Check_Mouse_Pos(float allow_move)
                panel = hud_panel[i];
                HUD_Panel_UpdatePosSize();
 
-               border = max(8, panel_bg_border); // FORCED border so a small border size doesn't mean you can't resize
+               float border = max(8, panel_bg_border); // FORCED border so a small border size doesn't mean you can't resize
 
                // move
                if(allow_move && mousepos.x > panel_pos.x && mousepos.y > panel_pos.y && mousepos.x < panel_pos.x + panel_size.x && mousepos.y < panel_pos.y + panel_size.y)
@@ -1011,7 +1007,7 @@ void HUD_Panel_FirstInDrawQ(float id)
 
 void HUD_Panel_Highlight(float allow_move)
 {
-       float i, j = 0, border;
+       int i, j = 0;
 
        while(j < HUD_PANEL_NUM)
        {
@@ -1021,7 +1017,7 @@ void HUD_Panel_Highlight(float allow_move)
                panel = hud_panel[i];
                HUD_Panel_UpdatePosSize();
 
-               border = max(8, panel_bg_border); // FORCED border so a small border size doesn't mean you can't resize
+               float border = max(8, panel_bg_border); // FORCED border so a small border size doesn't mean you can't resize
 
                // move
                if(allow_move && mousepos.x > panel_pos.x && mousepos.y > panel_pos.y && mousepos.x < panel_pos.x + panel_size.x && mousepos.y < panel_pos.y + panel_size.y)
@@ -1228,7 +1224,7 @@ void HUD_Configure_DrawGrid()
 float _menu_alpha_prev;
 void HUD_Configure_Frame()
 {
-       float i;
+       int i;
        if(autocvar__hud_configure)
        {
                if(isdemo() || intermission == 2)
index ae439f4..13f9545 100644 (file)
@@ -392,14 +392,12 @@ void Ent_Remove();
 
 void Ent_RemovePlayerScore()
 {
-       float i;
-
-       if(self.owner)
-       {
+       if(self.owner) {
                SetTeam(self.owner, -1);
                self.owner.gotscores = 0;
-               for(i = 0; i < MAX_SCORE; ++i)
+               for(int i = 0; i < MAX_SCORE; ++i) {
                        self.owner.(scores[i]) = 0; // clear all scores
+               }
        }
 }
 
index df008d5..c40fae4 100644 (file)
@@ -21,7 +21,7 @@ string MapVote_FormatMapItem(int id, string map, float _count, float maxwidth, v
        return strcat(pre, map, post);
 }
 
-string GameTypeVote_DescriptionByID(float id)
+string GameTypeVote_DescriptionByID(int id)
 {
        return MapInfo_Type_Description(MapInfo_Type_FromString(mv_maps[id]));
 }
@@ -381,7 +381,6 @@ void MapVote_Draw()
 
 void Cmd_MapVote_MapDownload(float argc)
 {
-       float id;
        entity pak;
 
        if(argc != 2 || !mv_pk3list)
@@ -390,7 +389,7 @@ void Cmd_MapVote_MapDownload(float argc)
                return;
        }
 
-       id = stof(argv(1));
+       int id = stof(argv(1));
        for(pak = mv_pk3list; pak; pak = pak.chain)
                if(pak.sv_entnum == id)
                        break;
index d8ace55..94717a2 100644 (file)
@@ -32,7 +32,7 @@ vector gtv_text_size_small;
 
 string MapVote_FormatMapItem(int id, string map, float count, float maxwidth, vector fontsize);
 
-string GameTypeVote_DescriptionByID(float id);
+string GameTypeVote_DescriptionByID(int id);
 
 vector MapVote_RGB(int id);
 
index 334fefc..d58b1ce 100644 (file)
@@ -24,14 +24,10 @@ void _Movetype_CheckVelocity() // SV_CheckVelocity
 
 float _Movetype_CheckWater(entity ent) // SV_CheckWater
 {
-       int supercontents;
-       float nativecontents;
-       vector point;
+       vector point = ent.move_origin;
+       point.z += (ent.mins.z + 1);
 
-       point = ent.move_origin;
-       point_z += (ent.mins.z + 1);
-
-       nativecontents = pointcontents(point);
+       int nativecontents = pointcontents(point);
 
        if(ent.move_watertype)
        if(ent.move_watertype != nativecontents)
@@ -44,7 +40,7 @@ float _Movetype_CheckWater(entity ent) // SV_CheckWater
        ent.move_waterlevel = 0;
        ent.move_watertype = CONTENT_EMPTY;
 
-       supercontents = Mod_Q1BSP_SuperContentsFromNativeContents(nativecontents);
+       int supercontents = Mod_Q1BSP_SuperContentsFromNativeContents(nativecontents);
        if(supercontents & DPCONTENTS_LIQUIDSMASK)
        {
                ent.move_watertype = nativecontents;
index 5625c23..0145f55 100644 (file)
@@ -8,8 +8,8 @@
 .vector move_velocity;
 .vector move_avelocity;
 .int move_flags;
-.float move_watertype;
-.float move_waterlevel;
+.int move_watertype;
+.int move_waterlevel;
 .void(void) move_touch;
 .void(float, float) contentstransition;
 .float move_bounce_factor;
index 7f84f0e..1822acb 100644 (file)
@@ -118,24 +118,20 @@ void draw_teamradar_player(vector coord3d, vector pangles, vector rgb)
 
 void draw_teamradar_icon(vector coord, float icon, entity pingdata, vector rgb, float a)
 {
-       float dt;
-       vector v;
-       float i;
-
        coord = teamradar_texcoord_to_2dcoord(teamradar_3dcoord_to_texcoord(coord));
        drawpic(coord - '4 4 0', strcat("gfx/teamradar_icon_", ftos(icon)), '8 8 0', rgb, a, 0);
 
        if(pingdata)
        {
-               for(i = 0; i < MAX_TEAMRADAR_TIMES; ++i)
+               for(int i = 0; i < MAX_TEAMRADAR_TIMES; ++i)
                {
-                       dt = pingdata.(teamradar_times[i]);
+                       float dt = pingdata.(teamradar_times[i]);
                        if(dt == 0)
                                continue;
                        dt = time - dt;
                        if(dt >= 1 || dt <= 0)
                                continue;
-                       v = '2 2 0' * teamradar_size * dt;
+                       vector v = '2 2 0' * teamradar_size * dt;
                        drawpic(coord - 0.5 * v, "gfx/teamradar_ping", v, '1 1 1', (1 - dt) * a, DRAWFLAG_ADDITIVE);
                }
        }
index 073223f..44bd667 100644 (file)
@@ -6,7 +6,7 @@
 //  Last updated: December 28th, 2011
 // =========================================================
 
-const float MAX_RPN_STACK = 16;
+const int MAX_RPN_STACK = 16;
 int rpn_db;
 int rpn_error;
 int rpn_sp;
index 1ad245c..983df24 100644 (file)
@@ -29,7 +29,7 @@
        CSQCMODEL_PROPERTY(2, int, ReadInt24_t, WriteInt24_t, effects) \
        CSQCMODEL_PROPERTY(4, int, ReadByte, WriteByte, modelflags) \
        CSQCMODEL_PROPERTY_SCALED(8, float, ReadByte, WriteByte, alpha, 254, -1, 254) \
-       CSQCMODEL_PROPERTY(16, float, ReadByte, WriteByte, skin) \
+       CSQCMODEL_PROPERTY(16, int, ReadByte, WriteByte, skin) \
        CSQCMODEL_PROPERTY(32, float, ReadApproxPastTime, WriteApproxPastTime, death_time) \
        CSQCMODEL_PROPERTY(64, float, ReadByte, WriteByte, solid) \
        CSQCMODEL_IF(!isplayer) \
@@ -42,7 +42,7 @@
                CSQCMODEL_PROPERTY_SCALED(256, float, ReadByte, WriteByte, colormod_z, 255, 0, 255) \
        CSQCMODEL_ENDIF \
        CSQCMODEL_IF(isplayer) \
-               CSQCMODEL_PROPERTY(128, float, ReadByte, WriteByte, anim_state) \
+               CSQCMODEL_PROPERTY(128, int, ReadByte, WriteByte, anim_state) \
                CSQCMODEL_PROPERTY(128, float, ReadApproxPastTime, WriteApproxPastTime, anim_time) \
                CSQCMODEL_IF(!islocalplayer) \
                        CSQCMODEL_PROPERTY(256, float, ReadChar, WriteChar, anim_lower_action) \
index 05c35c7..356039b 100644 (file)
@@ -1378,13 +1378,11 @@ void Local_Notification_centerprint_generic(
        string input, string durcnt,
        int cpid, float f1, float f2)
 {
-       string selected;
-       float sel_num;
        arg_slot[0] = ""; arg_slot[1] = "";
 
-       for(sel_num = 0;(durcnt != "");)
+       for(int sel_num = 0;(durcnt != "");)
        {
-               selected = car(durcnt); durcnt = cdr(durcnt);
+               string selected = car(durcnt); durcnt = cdr(durcnt);
                NOTIF_HIT_MAX(NOTIF_MAX_DURCNT, "Local_Notification_centerprint_generic");
                switch(strtolower(selected))
                {
@@ -1657,7 +1655,7 @@ void Local_Notification(int net_type, int net_name, ...count)
 
 // WOVA = Without Variable Arguments
 void Local_Notification_WOVA(
-       float net_type, float net_name,
+       int net_type, float net_name,
        float stringcount, float floatcount,
        string s1, string s2, string s3, string s4,
        float f1, float f2, float f3, float f4)
@@ -1678,8 +1676,8 @@ void Local_Notification_WOVA(
 #ifdef CSQC
 void Read_Notification(float is_new)
 {
-       float net_type = ReadByte();
-       float net_name = ReadShort();
+       int net_type = ReadByte();
+       int net_name = ReadShort();
 
        entity notif;
 
index 89e1c22..1bbf648 100644 (file)
@@ -2055,9 +2055,6 @@ string get_model_datafilename(string m, float sk, string fil)
 
 float get_model_parameters(string m, float sk)
 {
-       string fn, s, c;
-       float fh, i;
-
        get_model_parameters_modelname = string_null;
        get_model_parameters_modelskin = -1;
        get_model_parameters_name = string_null;
@@ -2068,7 +2065,7 @@ float get_model_parameters(string m, float sk)
        get_model_parameters_desc = string_null;
        get_model_parameters_bone_upperbody = string_null;
        get_model_parameters_bone_weapon = string_null;
-       for(i = 0; i < MAX_AIM_BONES; ++i)
+       for(int i = 0; i < MAX_AIM_BONES; ++i)
        {
                get_model_parameters_bone_aim[i] = string_null;
                get_model_parameters_bone_aimweight[i] = 0;
@@ -2091,8 +2088,8 @@ float get_model_parameters(string m, float sk)
                m = substring(m, 0, -7);
        }
 
-       fn = get_model_datafilename(m, sk, "txt");
-       fh = fopen(fn, FILE_READ);
+       string fn = get_model_datafilename(m, sk, "txt");
+       int fh = fopen(fn, FILE_READ);
        if(fh < 0)
        {
                sk = 0;
@@ -2104,6 +2101,7 @@ float get_model_parameters(string m, float sk)
 
        get_model_parameters_modelname = m;
        get_model_parameters_modelskin = sk;
+       string s, c;
        while((s = fgets(fh)))
        {
                if(s == "")
@@ -2135,7 +2133,7 @@ float get_model_parameters(string m, float sk)
                        get_model_parameters_bone_upperbody = s;
                if(c == "bone_weapon")
                        get_model_parameters_bone_weapon = s;
-               for(i = 0; i < MAX_AIM_BONES; ++i)
+               for(int i = 0; i < MAX_AIM_BONES; ++i)
                        if(c == strcat("bone_aim", ftos(i)))
                        {
                                get_model_parameters_bone_aimweight[i] = stof(car(s));
index 2b25afa..3d2bdf4 100644 (file)
@@ -60,24 +60,24 @@ vector arc_shotorigin[4];
 .vector beam_start;
 .vector beam_dir;
 .vector beam_wantdir;
-.float beam_type;
-
-const float ARC_BT_MISS =        0x00;
-const float ARC_BT_WALL =        0x01;
-const float ARC_BT_HEAL =        0x02;
-const float ARC_BT_HIT =         0x03;
-const float ARC_BT_BURST_MISS =  0x10;
-const float ARC_BT_BURST_WALL =  0x11;
-const float ARC_BT_BURST_HEAL =  0x12;
-const float ARC_BT_BURST_HIT =   0x13;
-const float ARC_BT_BURSTMASK =   0x10;
-
-const float ARC_SF_SETTINGS =    1;
-const float ARC_SF_START =       2;
-const float ARC_SF_WANTDIR =     4;
-const float ARC_SF_BEAMDIR =     8;
-const float ARC_SF_BEAMTYPE =    16;
-const float ARC_SF_LOCALMASK =   14;
+.int beam_type;
+
+const int ARC_BT_MISS =        0x00;
+const int ARC_BT_WALL =        0x01;
+const int ARC_BT_HEAL =        0x02;
+const int ARC_BT_HIT =         0x03;
+const int ARC_BT_BURST_MISS =  0x10;
+const int ARC_BT_BURST_WALL =  0x11;
+const int ARC_BT_BURST_HEAL =  0x12;
+const int ARC_BT_BURST_HIT =   0x13;
+const int ARC_BT_BURSTMASK =   0x10;
+
+const int ARC_SF_SETTINGS =    1;
+const int ARC_SF_START =       2;
+const int ARC_SF_WANTDIR =     4;
+const int ARC_SF_BEAMDIR =     8;
+const int ARC_SF_BEAMTYPE =    16;
+const int ARC_SF_LOCALMASK =   14;
 #endif
 #ifdef SVQC
 ARC_SETTINGS(WEP_ADD_CVAR, WEP_ADD_PROP)
index 18a6dc6..15b6409 100644 (file)
@@ -194,7 +194,7 @@ void register_weapons_done()
        dummy_weapon_info.w_crosshair_size = 1;
        dummy_weapon_info.model2 = "";
 
-       float i;
+       int i;
        weaponorder_byid = "";
        for(i = WEP_MAXCOUNT; i >= 1; --i)
                if(weapon_info[i-1])
index ac460bb..2cb2514 100644 (file)
@@ -48,9 +48,9 @@ IN THE SOFTWARE.\
 
 .vector glowmod;
 .vector view_ofs;
-.float frame;
+.int frame;
 .float frame1time;
-.float frame2;
+.int frame2;
 .float frame2time;
 .float lerpfrac;
 
@@ -65,8 +65,8 @@ const int CSQCMODEL_PROPERTY_LERPFRAC = 65536;
 const int CSQCMODEL_PROPERTY_SIZE = 32768;
 
 #define ALLPROPERTIES_COMMON \
-       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_FRAME, float, ReadByte, WriteByte, frame) \
-       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_MODELINDEX, float, ReadShort, WriteShort, modelindex) \
+       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_FRAME, int, ReadByte, WriteByte, frame) \
+       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_MODELINDEX, int, ReadShort, WriteShort, modelindex) \
        CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_ORIGIN, float, ReadCoord, WriteCoord, origin_x) \
        CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_ORIGIN, float, ReadCoord, WriteCoord, origin_y) \
        CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_ORIGIN, float, ReadCoord, WriteCoord, origin_z) \
@@ -89,7 +89,7 @@ const int CSQCMODEL_PROPERTY_SIZE = 32768;
 .float frame4time;
 .float lerpfrac4;
 #define ALLPROPERTIES ALLPROPERTIES_COMMON \
-       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_FRAME2, float, ReadByte, WriteByte, frame2) \
+       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_FRAME2, int, ReadByte, WriteByte, frame2) \
        CSQCMODEL_PROPERTY_SCALED(CSQCMODEL_PROPERTY_LERPFRAC, float, ReadByte, WriteByte, lerpfrac, 255, 0, 255)
 #else
 #define ALLPROPERTIES ALLPROPERTIES_COMMON
index 6be1efc..c27d990 100644 (file)
@@ -2151,9 +2151,9 @@ void(float skel) skel_delete = #275; // deletes skeleton at the beginning of the
 float(float modlindex, string framename) frameforname = #276; // finds number of a specified frame in the animation, returns -1 if no match found
 float(float modlindex, float framenum) frameduration = #277; // returns the intended play time (in seconds) of the specified framegroup, if it does not exist the result is 0, if it is a single frame it may be a small value around 0.1 or 0.
 //fields:
-.float skeletonindex; // active skeleton overriding standard animation on model
-.float frame; // primary framegroup animation (strength = 1 - lerpfrac - lerpfrac3 - lerpfrac4)
-.float frame2; // secondary framegroup animation (strength = lerpfrac)
+.int skeletonindex; // active skeleton overriding standard animation on model
+.int frame; // primary framegroup animation (strength = 1 - lerpfrac - lerpfrac3 - lerpfrac4)
+.int frame2; // secondary framegroup animation (strength = lerpfrac)
 .float frame3; // tertiary framegroup animation (strength = lerpfrac3)
 .float frame4; // quaternary framegroup animation (strength = lerpfrac4)
 .float lerpfrac; // strength of framegroup blend
index de39d64..fadb67d 100644 (file)
@@ -104,7 +104,7 @@ void                end_sys_globals;                // flag for structure dumping
 //
 // system fields (*** = do not set in prog code, maintained by C code)
 //
-.float         modelindex;             // *** model index in the precached list
+.int           modelindex;             // *** model index in the precached list
 .vector                absmin, absmax; // *** origin + mins / maxs
 
 .float         ltime;                  // local time for entity
@@ -121,7 +121,7 @@ void                end_sys_globals;                // flag for structure dumping
 
 .string                classname;              // spawn function
 .string                model;
-.float         frame;
+.int           frame;
 .int           skin;
 .int           effects;