]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into fruitiex/fruitbalance
authorFruitieX <rasse@rasse-lappy.localdomain>
Fri, 30 Jul 2010 23:36:14 +0000 (02:36 +0300)
committerFruitieX <rasse@rasse-lappy.localdomain>
Fri, 30 Jul 2010 23:36:14 +0000 (02:36 +0300)
27 files changed:
defaultXonotic.cfg
gfx/conback.tga
gfx/conback2.tga [new file with mode: 0644]
gfx/conback3.tga [new file with mode: 0644]
gfx/hud/luminos/ammo_bullets.tga
gfx/hud/luminos/ammo_cells.tga
gfx/hud/luminos/ammo_fuel.tga
gfx/hud/luminos/ammo_rockets.tga
gfx/hud/luminos/ammo_shells.tga
gfx/hud/luminos/armor.tga
gfx/hud/luminos/health.tga
gfx/hud/luminos/nexball_carrying.tga [new file with mode: 0644]
gfx/hud/luminos/notify_telefrag.tga [new file with mode: 0644]
models/items/jetpack.blend [deleted file]
models/vehicles/raptor_cockpit.dpm
models/vehicles/spinner.dpm [new file with mode: 0644]
qcsrc/client/hud.qh
qcsrc/client/mapvoting.qc
qcsrc/client/waypointsprites.qc
qcsrc/common/util.qc
qcsrc/menu/item/borderimage.c
qcsrc/menu/item/dialog.c
qcsrc/menu/xonotic/playermodel.c
qcsrc/server/vehicles/raptor.qc
qcsrc/server/vehicles/vehicles.qc
qcsrc/server/vehicles/vehicles.qh
vehicle_raptor.cfg [new file with mode: 0644]

index 260493ac780c16f55fc0b956c2cc87e47cbe002e..037505dd0a0a7ef79a202a061bc8591cf557a4ff 100644 (file)
@@ -1898,3 +1898,16 @@ set sv_q3acompat_machineshotgunswap 0 "shorthand for swapping uzi and shotgun (f
 set g_movement_highspeed 1 "movement speed modification factor (only changes movement when above maxspeed)"
 
 set g_maxspeed 0 "player speed limit, faster players are killed (0 for unlimited speed)"
+
+scr_conalpha 1
+scr_conalpha2factor 0.3
+scr_conalpha3factor 1
+scr_conalphafactor 0.8
+scr_conbrightness 0.35
+scr_conforcewhiledisconnected 1
+scr_conscroll2_x 0.11
+scr_conscroll2_y 0.2
+scr_conscroll3_x 0
+scr_conscroll3_y 0
+scr_conscroll_x -0.1
+scr_conscroll_y -0.3
index d8d927739b3fd02726912cae0b86cbb43eb0c9f1..39beb59eaf87602a7c7174bba3557289cfc99b78 100644 (file)
Binary files a/gfx/conback.tga and b/gfx/conback.tga differ
diff --git a/gfx/conback2.tga b/gfx/conback2.tga
new file mode 100644 (file)
index 0000000..39c5dff
Binary files /dev/null and b/gfx/conback2.tga differ
diff --git a/gfx/conback3.tga b/gfx/conback3.tga
new file mode 100644 (file)
index 0000000..b662dba
Binary files /dev/null and b/gfx/conback3.tga differ
index 8f3739d4821b01512a2a769f08c4212cc61fc3ce..c06e9949189639ca79afd384a388e8cf9e8550c7 100644 (file)
Binary files a/gfx/hud/luminos/ammo_bullets.tga and b/gfx/hud/luminos/ammo_bullets.tga differ
index 4850763419258e81c8edb738f4f6178ef19e8868..eda3e46f268892be5d6019c40e5aa23e007a69af 100644 (file)
Binary files a/gfx/hud/luminos/ammo_cells.tga and b/gfx/hud/luminos/ammo_cells.tga differ
index 4a3a2d5563a733f4fd0895a5eda3636d8f33fc16..3f3a8918f07171a8018a7a1074127ae7e363d408 100644 (file)
Binary files a/gfx/hud/luminos/ammo_fuel.tga and b/gfx/hud/luminos/ammo_fuel.tga differ
index 9b34ea79389418aa3d65dc2a089bb3301a18a1ba..a7bf03e4162ac16055a1cd317d2cc678c093e86b 100644 (file)
Binary files a/gfx/hud/luminos/ammo_rockets.tga and b/gfx/hud/luminos/ammo_rockets.tga differ
index f62c715625b7a3ca69e2c082fdf03c0f138503c8..5fe646987136016599a177e583825ebb4ab4b18f 100644 (file)
Binary files a/gfx/hud/luminos/ammo_shells.tga and b/gfx/hud/luminos/ammo_shells.tga differ
index f9e47011aa7c1a5631bcadd1a2778e0aaeffe705..b52445d539903983f71711189d4cacfe33f9723c 100644 (file)
Binary files a/gfx/hud/luminos/armor.tga and b/gfx/hud/luminos/armor.tga differ
index 26e40865c992fd6acf42e027b4480b896b057485..d19db5095f66be5874d02c3800473a54a695f23a 100644 (file)
Binary files a/gfx/hud/luminos/health.tga and b/gfx/hud/luminos/health.tga differ
diff --git a/gfx/hud/luminos/nexball_carrying.tga b/gfx/hud/luminos/nexball_carrying.tga
new file mode 100644 (file)
index 0000000..2f993e0
Binary files /dev/null and b/gfx/hud/luminos/nexball_carrying.tga differ
diff --git a/gfx/hud/luminos/notify_telefrag.tga b/gfx/hud/luminos/notify_telefrag.tga
new file mode 100644 (file)
index 0000000..279910f
Binary files /dev/null and b/gfx/hud/luminos/notify_telefrag.tga differ
diff --git a/models/items/jetpack.blend b/models/items/jetpack.blend
deleted file mode 100644 (file)
index 5a08915..0000000
Binary files a/models/items/jetpack.blend and /dev/null differ
index 332b2d7bfc1b67a4ab4b4636f99d524ed3570202..fe933e4e427835b1a15efe7231cc88a5e1982282 100644 (file)
Binary files a/models/vehicles/raptor_cockpit.dpm and b/models/vehicles/raptor_cockpit.dpm differ
diff --git a/models/vehicles/spinner.dpm b/models/vehicles/spinner.dpm
new file mode 100644 (file)
index 0000000..d3d83b4
Binary files /dev/null and b/models/vehicles/spinner.dpm differ
index 89f5edbdcc3228d8d128d4a1b69f87dbf80181fc..bdc533edbd7e818a56c7b473cf7c63980a124e1c 100644 (file)
@@ -33,7 +33,6 @@ float last_weapon;
 float weapontime;
 
 float teamnagger;
-float hud_fg_alpha;
 float hud_accuracy_hud;
 float hud_border_thickness;
 float hud_accuracy_border_thickness;
index c352cacaea05af16daa4feb922bcc4b8d81bc472..7c3bcecc50d22be197f696b15a60b05036dd466f 100644 (file)
@@ -249,7 +249,7 @@ void MapVote_Draw()
                MapVote_DrawAbstain(pos, isize, xmax - xmin, tmp, i);
        }
 
-       drawpic(mv_mousepos, strcat("gfx/menu/", cvar_string("menu_skin"), "/cursor.tga"), '32 32 0', '1 1 1', hud_fg_alpha, DRAWFLAG_NORMAL);
+       drawpic(mv_mousepos, strcat("gfx/menu/", cvar_string("menu_skin"), "/cursor.tga"), '32 32 0', '1 1 1', autocvar_hud_panel_fg_alpha, DRAWFLAG_NORMAL);
 }
 
 void Cmd_MapVote_MapDownload(float argc)
index db0fdb83fd81a3dd46293211d9eca60df94157ad..d7b9ee9d01960829aa3992dcebec4eb6bb7e84c8 100644 (file)
@@ -166,7 +166,7 @@ void Draw_WaypointSprite()
        dist = vlen(self.origin - view_origin);
        
        float a;
-       a = self.alpha * hud_fg_alpha;
+       a = self.alpha * autocvar_hud_panel_fg_alpha;
 
        if(self.maxdistance > waypointsprite_normdistance)
                a *= pow(bound(0, (self.maxdistance - dist) / (self.maxdistance - waypointsprite_normdistance), 1), waypointsprite_distancealphaexponent);
index 9875529d3fe68c92084d6595e306dfe65f91ae06..72af701119045b374be237246f0d9289dd32989d 100644 (file)
@@ -226,43 +226,8 @@ float median(float a, float b, float c)
 // works for up to 10 decimals!
 string ftos_decimals(float number, float decimals)
 {
-       string result;
-       string tmp;
-       float len;
-
-       // if negative, cut off the sign first
-       if(number < 0)
-               return strcat("-", ftos_decimals(-number, decimals));
-       // it now is always positive!
-
-       // 3.516 -> 352
-       number = floor(number * pow(10, decimals) + 0.5);
-
-       // 352 -> "352"
-       result = ftos(number);
-       len = strlen(result);
-       // does it have a decimal point (should not happen)? If there is one, it is always at len-7)
-               // if ftos had messed it up, which should never happen: "34278.000000"
-       if(len >= 7)
-               if(substring(result, len - 7, 1) == ".")
-               {
-                       dprint("ftos(integer) has comma? Can't be. Affected result: ", result, "\n");
-                       result = substring(result, 0, len - 7);
-                       len -= 7;
-               }
-               // "34278"
-       if(decimals == 0)
-               return result; // don't insert a point for zero decimals
-       // is it too short? If yes, insert leading zeroes
-       if(len <= decimals)
-       {
-               result = strcat(substring("0000000000", 0, decimals - len + 1), result);
-               len = decimals + 1;
-       }
-       // and now... INSERT THE POINT!
-       tmp = substring(result, len - decimals, decimals);
-       result = strcat(substring(result, 0, len - decimals), ".", tmp);
-       return result;
+       // we have sprintf...
+       return sprintf("%.*f", decimals, number);
 }
 
 float time;
index 0229b53a55b9d6e18a72ba6e97bdd313d92d5193..236b2352221259a98b0e5604b4e3e2b06180b5c9 100644 (file)
@@ -13,7 +13,6 @@ CLASS(BorderImage) EXTENDS(Label)
        ATTRIB(BorderImage, isNexposeeTitleBar, float, 0)
        ATTRIB(BorderImage, zoomedOutTitleBarPosition, float, 0)
        ATTRIB(BorderImage, zoomedOutTitleBar, float, 0)
-       ATTRIB(BorderImage, borderLines, float, 1)
 ENDCLASS(BorderImage)
 #endif
 
@@ -36,7 +35,8 @@ void BorderImage_resizeNotify(entity me, vector relOrigin, vector relSize, vecto
                me.realFontSize_Nexposeed = me.realFontSize;
        }
        SUPER(BorderImage).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
-       me.borderVec = me.borderHeight / absSize_y * (eY + eX * (absSize_y / absSize_x));
+       me.borderVec_x = me.borderHeight / absSize_x;
+       me.borderVec_y = me.borderHeight / absSize_y;
        me.realOrigin_y = 0.5 * (me.borderVec_y - me.realFontSize_y);
        if(me.closeButton)
        {
@@ -60,7 +60,7 @@ void BorderImage_draw(entity me)
        //print(vtos(me.borderVec), "\n");
 
        if(me.src)
-               draw_BorderPicture('0 0 0', me.src, '1 1 0', me.color, 1, me.borderLines * me.borderVec);
+               draw_BorderPicture('0 0 0', me.src, '1 1 0', me.color, 1, me.borderVec);
        if(me.fontSize > 0)
        {
                vector ro, rf, df;
index 8202fbbb67e4c358989d96c20bae9eb2dd002cec..3d537bfb92f3bc74f735a00a3031100d335e6118 100644 (file)
@@ -59,6 +59,7 @@ CLASS(Dialog) EXTENDS(InputContainer)
        ATTRIB(Dialog, zoomedOutTitleBar, float, 0)
 
        ATTRIB(Dialog, backgroundImage, string, string_null)
+       ATTRIB(Dialog, borderLines, float, 1)
        ATTRIB(Dialog, closeButtonImage, string, string_null)
 
        ATTRIB(Dialog, frame, entity, NULL)
@@ -128,7 +129,7 @@ void Dialog_configureDialog(entity me)
        float absWidth, absHeight;
 
        me.frame = spawnBorderImage();
-       me.frame.configureBorderImage(me.frame, me.title, me.titleFontSize, me.color, me.backgroundImage, me.titleHeight);
+       me.frame.configureBorderImage(me.frame, me.title, me.titleFontSize, me.color, me.backgroundImage, me.borderLines * me.titleHeight);
        me.frame.zoomedOutTitleBarPosition = me.zoomedOutTitleBarPosition;
        me.frame.zoomedOutTitleBar = me.zoomedOutTitleBar;
        me.frame.alpha = me.alpha;
@@ -138,9 +139,9 @@ void Dialog_configureDialog(entity me)
                me.titleHeight = 0; // no title bar
 
        absWidth = me.intendedWidth * conwidth;
-       absHeight = me.titleHeight + me.marginTop + me.rows * me.rowHeight + (me.rows - 1) * me.rowSpacing + me.marginBottom;
+       absHeight = me.borderLines * me.titleHeight + me.marginTop + me.rows * me.rowHeight + (me.rows - 1) * me.rowSpacing + me.marginBottom;
        me.itemOrigin  = eX * (me.marginLeft / absWidth)
-                      + eY * ((me.titleHeight + me.marginTop) / absHeight);
+                      + eY * ((me.borderLines * me.titleHeight + me.marginTop) / absHeight);
        me.itemSize    = eX * ((1 - (me.marginLeft + me.marginRight + me.columnSpacing * (me.columns - 1)) / absWidth) / me.columns)
                       + eY * (me.rowHeight / absHeight);
        me.itemSpacing = me.itemSize
index 585a5f7fc1cf342c1dd919eb81959eb750a0b119..f4f7526f04bd610070fc8a4b738baeb773e6ca0d 100644 (file)
@@ -47,10 +47,13 @@ void XonoticPlayerModelSelector_configureXonoticPlayerModelSelector(entity me)
        float sortbuf, glob, i;
        string fn;
 
+       glob = search_begin(get_model_datafilename(string_null, -1, "txt"), TRUE, TRUE);
+       if (glob < 0)
+               return;
+
        me.configureXonoticImage(me, string_null, -1);
 
        sortbuf = buf_create();
-       glob = search_begin(get_model_datafilename(string_null, -1, "txt"), TRUE, TRUE);
        for(i = 0; i < search_getsize(glob); ++i)
        {
                // select model #i!
@@ -85,7 +88,8 @@ void XonoticPlayerModelSelector_configureXonoticPlayerModelSelector(entity me)
        }
        buf_del(sortbuf);
        get_model_parameters(string_null, 0);
-       me.loadCvars(me);
+       me.loadCvars(me); // this will select the initial model, depending on the current cvars
+       me.go(me, 0); // this will set the vars for the selected model
 }
 void XonoticPlayerModelSelector_destroy(entity me)
 {
@@ -95,21 +99,21 @@ void XonoticPlayerModelSelector_destroy(entity me)
 
 void XonoticPlayerModelSelector_loadCvars(entity me)
 {
+       string skin, model;
        float i;
-       if(me.currentModel)
-               strunzone(me.currentModel);
-       me.currentSkin = cvar("_cl_playerskin");
-       me.currentModel = strzone(cvar_string("_cl_playermodel"));
+
+       skin = cvar_string("_cl_playerskin");
+       model = cvar_string("_cl_playermodel");
+
        for(i = 0; i < me.numModels; ++i)
        {
-               if(bufstr_get(me.bufModels, BUFMODELS_COUNT*i+BUFMODELS_MODEL) == me.currentModel)
-               if(bufstr_get(me.bufModels, BUFMODELS_COUNT*i+BUFMODELS_SKIN) == ftos(me.currentSkin))
+               if(bufstr_get(me.bufModels, BUFMODELS_COUNT*i+BUFMODELS_MODEL) == model)
+               if(bufstr_get(me.bufModels, BUFMODELS_COUNT*i+BUFMODELS_SKIN) == skin)
                        break;
        }
        if(i >= me.numModels) // fail
                i = 0;
        me.idxModels = i;
-       me.go(me, 0); // this will set the other vars for currentSkin and currentModel
 }
 
 void XonoticPlayerModelSelector_go(entity me, float d)
@@ -139,12 +143,16 @@ void XonoticPlayerModelSelector_go(entity me, float d)
 
 void PlayerModelSelector_Next_Click(entity btn, entity me)
 {
+       if (me.numModels <= 0)
+               return;
        me.go(me, +1);
        me.saveCvars(me);
 }
 
 void PlayerModelSelector_Prev_Click(entity btn, entity me)
 {
+       if (me.numModels <= 0)
+               return;
        me.go(me, -1);
        me.saveCvars(me);
 }
@@ -161,8 +169,13 @@ void XonoticPlayerModelSelector_draw(entity me)
        float i, n;
        vector o;
 
-       SUPER(XonoticPlayerModelSelector).draw(me);
+       if (me.numModels <= 0)
+       {
+               draw_CenterText('0.5 0.5 0', "<no model found>", me.realFontSize, '1 1 1', 0.6, FALSE);
+               return;
+       }
 
+       SUPER(XonoticPlayerModelSelector).draw(me);
        // draw text on the image, handle \n in the description
        draw_CenterText('0.5 0 0', me.currentModelTitle, me.realFontSize * (me.titleFontSize / me.fontSize), SKINCOLOR_MODELTITLE, SKINALPHA_MODELTITLE, FALSE);
 
index d7f4de67aa61eda41f70256ecf3979402074a22b..06392ec0db7978f515f6edc1d985ff8ffbf0f5fa 100644 (file)
@@ -84,13 +84,13 @@ void raptor_loadsettings()
     raptor_beam_leangth = CCVAR("_beam_length");
     raptor_beam_refire  = CCVAR("_beam_refire");
 
-    raptor_shield_max    = CCVAR("_shield_max");
+    raptor_shield_max    = CCVAR("_shield");
     raptor_shield_regen  = CCVAR("_shield_regen");
 
-    raptor_health_max    = CCVAR("_health_max");
+    raptor_health_max    = CCVAR("_health");
     raptor_health_regen  = CCVAR("_health_regen");
 
-    raptor_energy_max    = CCVAR("_energy_max");
+    raptor_energy_max    = CCVAR("_energy");
     raptor_energy_regen  = CCVAR("_energy_regen");
 }
 
@@ -234,7 +234,6 @@ void raptor_setanim(float start, float end, float length)
 }
 
 void raptor_beam (vector start, vector end, vector smin, vector smax, float bforce, float f_dmg, float deathtype)
-
 {
     vector hitloc, force, endpoint, dir;
     entity ent;
@@ -520,6 +519,7 @@ float raptor_pplug()
     setorigin(player,vhic.origin + '0 0 32');
 
     // Aim the gunz
+    /*
     vector target_angle, move_angle, org1, org2, targ;
 
     makevectors(player.v_angle);
@@ -549,7 +549,7 @@ float raptor_pplug()
     move_angle = shortangle_vxy(move_angle,(vhic.angles + vhic.gun2.angles));
     vhic.gun2.angles_x = bound(-15,move_angle_x + vhic.gun2.angles_x,15);
     vhic.gun2.angles_y = bound(-20,move_angle_y + vhic.gun2.angles_y,20);
-
+       */
     if(player.BUTTON_ATCK)
     if(vhic.vehicle_energy > (raptor_beam_aps * sys_frametime))
     {
@@ -832,7 +832,7 @@ void raptor_dinit()
     raptor_spawn();
 }
 
-void spawnfunc_vehicle_raptor2()
+void spawnfunc_vehicle_raptor()
 {
     self.cvar_basename      = "g_vehicle_raptor";
     raptor_loadsettings();
@@ -869,7 +869,7 @@ void spawnfunc_vehicle_raptor2()
 }
 
 
-void spawnfunc_vehicle_raptor()
+void spawnfunc_vehicle_raptor2()
 {
     entity iqm,dpm,md3;
 
index 5aac0f0f06f4235fd8edd56bc2c4fbb3a14a7bf8..7cc2949f6d90413957bb270bd598b4264597bfc6 100644 (file)
@@ -66,14 +66,15 @@ void vehicle_stdproc_damage(entity inflictor, entity attacker, float damage, flo
     if((self.vehicle_flags & VHF_HASSHIELD) && (self.vehicle_shield > 0))
     {
 
-        if not (self.tur_head.enemy)
+        
+        if (wasfreed(self.tur_head.enemy) || self.tur_head.enemy == world)
         {
             self.tur_head.enemy = spawn();
             self.tur_head.enemy.effects = EF_LOWPRECISION;
         }
 
-        setmodel(self.tur_head.enemy,"models/vhshield.md3");
-        setattachment(self.tur_head.enemy,self,"");
+        setmodel(self.tur_head.enemy, "models/vhshield.md3");
+        setattachment(self.tur_head.enemy, self, "");
 
         self.tur_head.enemy.colormod = '1 1 1';
         self.tur_head.enemy.alpha = 0.45;
index 192d83f6da4f21085cdf753b84dcc9b277eec9b2..8e452478e29ae2d344f1dd507efda99fc7d47322 100644 (file)
@@ -22,6 +22,8 @@ float SVC_UPDATEENTITY = 128; // Net.Protocol 0x80
 .entity gun1;
 .entity gun2;
 
+.entity shield;
+
 .float vehicle_health;
 .float vehicle_shield;
 .float vehicle_energy;
diff --git a/vehicle_raptor.cfg b/vehicle_raptor.cfg
new file mode 100644 (file)
index 0000000..bd2ff7c
--- /dev/null
@@ -0,0 +1,37 @@
+set g_vehicle_raptor_reload             1\r
+\r
+set g_vehicle_raptor_movestyle 1\r
+set g_vehicle_raptor_turnspeed 90\r
+set g_vehicle_raptor_turnroll 0.1\r
+set g_vehicle_raptor_pitchspeed 45\r
+set g_vehicle_raptor_speed_forward 1500\r
+set g_vehicle_raptor_speed_strafe 1500\r
+set g_vehicle_raptor_speed_up 1250\r
+set g_vehicle_raptor_speed_down 1400\r
+\r
+set g_vehicle_raptor_bomblet_waves  2\r
+set g_vehicle_raptor_bomblet_wavefirst  0.5\r
+set g_vehicle_raptor_bomblet_wavenext   0.3\r
+set g_vehicle_raptor_bomblet_wawespread 0.3\r
+set g_vehicle_raptor_bomblets       3\r
+set g_vehicle_raptor_bomblet_damage 90\r
+set g_vehicle_raptor_bomblet_edgedamage 40\r
+set g_vehicle_raptor_bomblet_radius 250\r
+set g_vehicle_raptor_bomblet_force  300\r
+set g_vehicle_raptor_bombs_refire   1\r
+\r
+set g_vehicle_raptor_beam_dps     200\r
+set g_vehicle_raptor_beam_fops    150\r
+set g_vehicle_raptor_beam_aps     100\r
+set g_vehicle_raptor_beam_size    8\r
+set g_vehicle_raptor_beam_leangth 1\r
+set g_vehicle_raptor_beam_refire  2\r
+\r
+set g_vehicle_raptor_shield   250\r
+set g_vehicle_raptor_shield_regen 50\r
+\r
+set g_vehicle_raptor_health   250\r
+set g_vehicle_raptor_health_regen 10\r
+\r
+set g_vehicle_raptor_energy   300\r
+set g_vehicle_raptor_energy_regen 50
\ No newline at end of file