From: Jakob MG Date: Fri, 25 Mar 2011 00:27:25 +0000 (+0100) Subject: save state before removing stale code X-Git-Tag: xonotic-v0.5.0~199^2~11^2~114 X-Git-Url: https://de.git.xonotic.org/?a=commitdiff_plain;h=f8d3cca565de8169190a42674619c1833850d749;p=xonotic%2Fxonotic-data.pk3dir.git save state before removing stale code --- diff --git a/effectinfo.txt b/effectinfo.txt index c6ba57308..cb32b3642 100644 --- a/effectinfo.txt +++ b/effectinfo.txt @@ -3889,7 +3889,7 @@ effect TE_TEI_G3RED_HIT trailspacing 40 type static color 0xFF0000 0xFF0011 -size 10 10 +size 10 10 sizeincrease -6 alpha 256 256 512 airfriction -4 @@ -3941,14 +3941,14 @@ effect TE_TEI_G3BLUE_HIT trailspacing 40 type static color 0x0000FF 0x1100FF -size 10 10 +size 10 10 sizeincrease -6 alpha 256 256 512 airfriction -4 //liquidfriction -4 type smoke -// Yellow +// Yellow effect TE_TEI_G3YELLOW countabsolute 1 type beam @@ -3990,7 +3990,7 @@ effect TE_TEI_G3YELLOW_HIT trailspacing 40 type static color 0xffff00 0xffff11 -size 10 10 +size 10 10 sizeincrease -6 alpha 256 256 512 airfriction -4 @@ -4044,7 +4044,7 @@ effect TE_TEI_G3PINK_HIT trailspacing 40 type static color 0xFF00FF 0xFF11FF -size 10 10 +size 10 10 sizeincrease -6 alpha 256 256 512 airfriction -4 @@ -4107,10 +4107,10 @@ originjitter 3 3 3 velocitymultiplier 2 staincolor 0x808080 0x808080 staintex 16 24 - + // effect for removing player model // "teleport" - + // cl_gentle deathfx // used in qcsrc/client/gibs.qc: pointparticles(particleeffectnum("damage_dissolve"), org, vel, amount) // small core blood no decals @@ -5214,13 +5214,13 @@ effect spiderbot_minigun_muzzleflash count 3 type spark color 0xff9c00 0xff8400 -tex 43 43 -size 5 7 +tex 48 55 +size 10 15 alpha 256 512 6280 airfriction 10 originjitter 2 2 2 velocityjitter 150 150 150 -velocitymultiplier 0.2 +velocitymultiplier 0.35 sizeincrease -100 stretchfactor 1.3 rotate -180 180 4000 -4000 @@ -5241,13 +5241,16 @@ stretchfactor 0.8 effect spiderbot_minigun_muzzleflash countabsolute 2 type static -tex 43 43 -color 0xff9c00 0xf6ff00 +tex 48 55 +color 0xff9c00 0xff8400 size 32 32 alpha 256 512 6680 sizeincrease -100 stretchfactor 0.1 rotate -180 180 4000 -4000 +lightradius 120 +lightradiusfade 8000 +lightcolor 3 3 0 effect spiderbot_minigun_impact countabsolute 1 @@ -5259,81 +5262,230 @@ alpha 50 100 1680 sizeincrease -100 stretchfactor 0.1 rotate -180 180 4000 -4000 +// fire effect spiderbot_minigun_impact count 7 type spark color 0xff9c00 0xff8400 -tex 43 43 -size 5 9 +tex 48 55 +size 9 15 alpha 256 512 6280 airfriction 10 originjitter 2 2 2 velocityjitter 250 250 150 velocitymultiplier 0.2 sizeincrease 100 -stretchfactor 1.2 +stretchfactor 3 airfriction 6 rotate -180 180 4000 -4000 +// smoke effect spiderbot_minigun_impact -count 10 +count 6 type smoke color 0xd0d0a0 0xffffff tex 0 8 size 10 20 -alpha 20 50 100 +alpha 50 50 140 sizeincrease 80 -velocityjitter 50 50 150 -velocitymultiplier 0.15 -gravity 1.1 -airfriction 6 +velocityjitter 100 100 250 +velocitymultiplier 0.47 +gravity 1.3 +airfriction 10 rotate -180 180 0 0 +// smoke 2 +effect spiderbot_minigun_impact +count 7 +type spark +color 0xd0d0a0 0xffffff +tex 0 8 +size 15 19 +alpha 25 51 128 +airfriction 6 +originjitter 2 2 2 +velocityjitter 250 250 150 +velocitymultiplier 0.2 +sizeincrease 100 +stretchfactor 7.6 // derbis effect spiderbot_minigun_impact notunderwater -count 8 +count 3 type alphastatic tex 66 68 color 0xffa35b 0xfff2be -size 2 5 +size 6 8 alpha 644 756 1484 gravity 1.1 airfriction 0.4 sizeincrease -10 -velocitymultiplier 0.1 +velocitymultiplier 0.15 originjitter 16 16 16 velocityjitter 124 124 224 rotate -180 180 -1000 1000 +// decal +effect spiderbot_minigun_impact +countabsolute 1 +type decal +tex 56 59 +size 5 10 +alpha 256 256 0 +originjitter 16 16 16 +rotate -180 180 0 0 + effect wakizashi_gun_impact -count 3 +count 15 type spark -color 0xff9c00 0xff8400 -tex 43 43 +color 0xff0000 0xc03535 +tex 41 41 +size 4 7 +alpha 256 512 1180 +airfriction 4 +gravity 3 +originjitter 40 40 10 +velocityjitter 350 350 550 +velocityoffset 0 0 700 +stretchfactor 0.9 +effect wakizashi_gun_impact +type smoke +count 24 +color 0xd0d0a0 0xc03535 +tex 0 8 +size 10 20 +alpha 50 90 150 +sizeincrease 80 +velocityjitter 250 250 450 +velocityoffset 0 0 600 +originjitter 40 40 10 +airfriction 4 +sizeincrease 80 +rotate -180 180 0 0 +effect wakizashi_gun_impact +countabsolute 1 +type smoke +tex 65 65 +color 0xff0000 0xc03535 +size 82 82 +alpha 250 300 680 +sizeincrease -180 +effect wakizashi_gun_impact +countabsolute 1 +type smoke +tex 33 33 +color 0xff0000 0xc03535 +size 40 40 +alpha 50 100 620 +sizeincrease 900 +rotate -180 180 400 -400 +effect wakizashi_gun_impact +countabsolute 1 +type decal +tex 59 59 +size 14 14 +alpha 256 256 0 +originjitter 16 16 16 +rotate -180 180 0 0 + +effect wakizashi_gun_muzzleflash +count 16 +type spark +color 0xff0000 0xc03535 +tex 8 15 size 5 7 alpha 256 512 6280 -airfriction 10 +airfriction 12 originjitter 2 2 2 -velocityjitter 150 150 150 +velocityjitter 200 200 200 velocitymultiplier 0.2 -sizeincrease -100 -stretchfactor 1.3 -rotate -180 180 4000 -4000 +sizeincrease -10 +stretchfactor 0.7 -effect wakizashi_gun_muzzleflash +// decal +effect raptor_cannon_impact +countabsolute 1 +type decal +tex 47 47 +size 24 24 +alpha 256 256 0 +originjitter 16 16 16 +rotate -180 180 0 0 +//spark +effect raptor_cannon_impact +notunderwater count 6 type spark -color 0xff9c00 0xff8400 +tex 40 40 +color 0xD400FF 0x571863 +size 1 1 +alpha 644 956 784 +gravity 1 +airfriction 0.2 +velocityoffset 0 0 150 +originjitter 16 16 16 +velocityjitter 124 124 524 +// smoke +effect raptor_cannon_impact +count 4 +type alphastatic +tex 0 7 +size 50 50 +color 0x646364 0x151515 +alpha 428 428 600 +rotate -180 180 0 0 +velocityjitter 200 200 300 +velocityoffset 0 0 340 +gravity 0.7 +airfriction 2 +// fire +effect raptor_cannon_impact +notunderwater +count 10 +type static +tex 48 55 +color 0xD400FF 0x571863 +size 33 44 +sizeincrease 25 +alpha 200 256 812 +bounce 1.5 +airfriction 8 +liquidfriction 8 +originjitter 8 8 8 +velocityjitter 312 312 312 + + +effect raptor_cannon_muzzleflash +count 16 +type spark +color 0xD400FF 0x571863 tex 8 15 -size 5 7 -alpha 256 512 6280 +size 10 17 +alpha 1256 1512 56280 airfriction 12 originjitter 2 2 2 velocityjitter 200 200 200 velocitymultiplier 0.2 sizeincrease -10 -stretchfactor 0.8 +stretchfactor 0.6 +effect raptor_cannon_muzzleflash +countabsolute 1 +type static +tex 48 55 +color 0xD400FF 0x571863 +size 32 32 +alpha 6056 20112 406280 +sizeincrease -100 +stretchfactor 0.1 +rotate -180 180 4000 -4000 +lightradius 150 +lightradiusfade 6000 +lightcolor 3 0 6 -raptor_cannon_impact + +// -----------------DOTC +// DOTC Scout drone +// Muzzle flash +// electricity +effect dotc_scout_mflash count 3 type spark color 0xff9c00 0xff8400 @@ -5347,8 +5499,8 @@ velocitymultiplier 0.2 sizeincrease -100 stretchfactor 1.3 rotate -180 180 4000 -4000 - -raptor_cannon_muzzleflash +// fire +effect dotc_scout_mflash count 6 type spark color 0xff9c00 0xff8400 @@ -5361,3 +5513,388 @@ velocityjitter 200 200 200 velocitymultiplier 0.2 sizeincrease -10 stretchfactor 0.8 +effect dotc_scout_mflash +countabsolute 2 +type static +tex 43 43 +color 0xff9c00 0xf6ff00 +size 32 32 +alpha 256 512 6680 +sizeincrease -100 +stretchfactor 0.1 +rotate -180 180 4000 -4000 + +// Projectile trail +// effect dotc_scout_ptrail + +// Projectile explode +effect dotc_scout_pexplode +countabsolute 1 +type static +tex 38 38 +color 0xff9c00 0xff8400 +size 12 12 +alpha 256 256 512 +// cloud of bouncing sparks +effect dotc_scout_pexplode +count 64 +type spark +tex 41 41 +color 0xff9c00 0xff8400 +size 1 2 +alpha 256 256 1024 +bounce 2 +stretchfactor 0.4 +//airfriction 2 +originjitter 1 1 1 +velocityjitter 112 112 112 +velocitymultiplier 40 + +// DOTC Light tank drone +// Muzzle flash +effect dotc_lighttank_mflash +count 12 +type spark +color 0x202020 0x0072ff +tex 8 15 +size 16 16 +alpha 328 328 4000 +originjitter 4 4 4 +velocityjitter 380 380 380 +velocitymultiplier 0.4 +stretchfactor 2 +sizeincrease -100 +airfriction 9 +effect dotc_lighttank_mflash +countabsolute 1 +type smoke +tex 65 65 +color 0x202020 0x0072ff +size 80 80 +alpha 256 512 3680 +sizeincrease -1000 +rotate -180 180 4000 -4000 + + +// Projectile trail +// effect dotc_lighttank_ptrail + +// Projectile explode +effect dotc_lighttank_pexplode +countabsolute 1 +type decal +tex 38 38 +size 32 32 +alpha 256 256 0 +originjitter 17 17 17 +lightradius 150 +lightradiusfade 250 +lightcolor 3.125 4.375 10 +// shockwave +effect dotc_lighttank_pexplode +countabsolute 1 +type static +tex 33 33 +color 0x80C0FF 0x80C0FF +size 1 1 +alpha 40 40 100 +sizeincrease 500 +// cloud of bouncing sparks +effect dotc_lighttank_pexplode +count 64 +type spark +tex 41 41 +color 0xFDFFD9 0xFDFFD9 +size 4 6 +alpha 256 256 1024 +stretchfactor 0.4 +airfriction 2 +originjitter 1 1 1 +velocityjitter 512 512 512 +// inner cloud of smoke +effect dotc_lighttank_pexplode +countabsolute 1 +type static +tex 65 65 +color 0x80C0FF 0xFFFFFF +size 65 65 +alpha 64 64 90 +sizeincrease 200 + +// DOTC Tank drone +// Muzzle flash +effect dotc_tank_mflash +count 12 +type spark +color 0xff9c00 0xff8400 +tex 8 15 +size 16 16 +alpha 328 328 4000 +originjitter 4 4 4 +velocityjitter 380 380 380 +velocitymultiplier 0.4 +stretchfactor 2 +sizeincrease -100 +airfriction 9 +effect dotc_tank_mflash +countabsolute 1 +type smoke +tex 65 65 +color 0xff9c00 0xff8400 +size 80 80 +alpha 256 512 3680 +sizeincrease -1000 +rotate -180 180 4000 -4000 +effect dotc_tank_mflash +count 18 +type smoke +tex 0 7 +size 30 50 +color 0x646364 0x151515 +velocitymultiplier 0.1 +alpha 128 128 300 +velocityjitter 164 164 164 +rotate -180 180 0 0 +sizeincrease -100 +effect dotc_tank_mflash +count 8 +type smoke +tex 0 7 +size 40 60 +color 0x646364 0x151515 +velocitymultiplier 0.05 +alpha 128 128 300 +velocityjitter 164 164 164 +rotate -180 180 0 0 +sizeincrease -100 +effect dotc_tank_mflash +countabsolute 3 +type smoke +tex 0 7 +size 30 50 +color 0x646364 0x151515 +alpha 228 228 400 +rotate -180 180 0 0 +sizeincrease 100 + +// Projectile trail +// effect dotc_tank_ptrail +// Projectile explode +effect dotc_tank_pexplode +count 12 +type spark +color 0xff9c00 0xff3c00 +tex 48 55 +size 10 70 +alpha 328 328 1200 +originjitter 4 4 4 +velocityjitter 330 330 420 +velocitymultiplier 2 +stretchfactor 3 +sizeincrease 120 +// smoke +effect dotc_tank_pexplode +count 10 +type alphastatic +tex 0 7 +size 10 30 +color 0x646364 0x151515 +alpha 428 428 400 +rotate -180 180 0 0 +velocityjitter 1300 1300 0 +sizeincrease 60 +airfriction 6 +effect dotc_tank_pexplode +count 5 +type alphastatic +tex 0 7 +size 90 100 +color 0x646364 0x151515 +alpha 428 428 400 +rotate -180 180 0 0 +velocityjitter 300 300 600 +velocityoffset 0 0 180 +sizeincrease -60 +airfriction 2 +// sparks nobounce +effect dotc_tank_pexplode +notunderwater +count 12 +type spark +tex 40 40 +color 0xffa35b 0xfff2be +size 3 1 +alpha 644 956 784 +gravity 1 +airfriction 0.2 +liquidfriction 0.8 +velocityoffset 0 0 80 +originjitter 16 16 16 +velocityjitter 424 424 924 +effect dotc_tank_pexplode +notunderwater +count 12 +type alphastatic +tex 66 68 +color 0xffa35b 0xfff2be +size 3 10 +alpha 644 956 784 +gravity 1 +airfriction 0.2 +liquidfriction 0.8 +velocityoffset 0 0 80 +originjitter 16 16 16 +velocityjitter 324 324 624 +rotate -180 180 -1000 1000 + +// DOTC Tank drone +// Muzzle flash +effect dotc_htank_mflash +count 24 +type smoke +tex 0 7 +size 30 50 +color 0x646364 0x151515 +velocitymultiplier 0.1 +alpha 128 128 300 +velocityjitter 164 164 164 +rotate -180 180 0 0 +sizeincrease 100 +// Projectile trail +// effect dotc_htank_ptrail +// Projectile explode +effect dotc_htank_pexplode + +// DOTC Rocket artillery drone +// Muzzle flash +effect dotc_rart_mflash +count 6 +type spark +color 0xff9c00 0xff8400 +tex 8 15 +size 16 16 +alpha 328 328 4000 +originjitter 4 4 4 +velocityjitter 180 180 180 +velocitymultiplier 0.4 +stretchfactor 2 +sizeincrease -100 +airfriction 9 +effect dotc_rart_mflash +count 18 +type smoke +tex 0 7 +size 30 50 +color 0x646364 0x151515 +velocitymultiplier 0.1 +alpha 128 128 300 +velocityjitter 164 164 164 +rotate -180 180 0 0 +sizeincrease -50 +effect dotc_rart_mflash +count 2 +type smoke +tex 0 7 +size 30 50 +color 0x646364 0x151515 +alpha 128 128 200 +velocityoffset 0 0 20 +velocityjitter 64 64 64 +rotate -180 180 0 0 +sizeincrease 20 +// Projectile trail +// effect dotc_rart_ptrail +// Projectile explode +effect dotc_rart_pexplode +countabsolute 1 +type decal +tex 8 16 +size 72 72 +alpha 256 256 0 +originjitter 23 23 23 +lightradius 100 +lightradiusfade 350 +lightcolor 8 4 1 +effect dotc_rart_pexplode +count 8 +type smoke +color 0xff9c00 0xff3c00 +tex 48 55 +size 1 2 +alpha 300 300 600 +originjitter 10 10 10 +velocityjitter 90 90 20 +stretchfactor 25 +sizeincrease 3 +// glow +effect dotc_rart_pexplode +countabsolute 1 +type static +tex 65 65 +color 0xff9c00 0xff3c00 +size 1 1 +alpha 200 200 500 +sizeincrease 700 +// smoke +effect dotc_rart_pexplode +count 5 +type alphastatic +tex 0 7 +size 1 20 +color 0x646364 0x151515 +alpha 428 428 400 +rotate -180 180 0 0 +velocityjitter 1000 1000 0 +sizeincrease 60 +airfriction 6 +effect dotc_rart_pexplode +count 10 +type alphastatic +tex 0 7 +size 100 120 +color 0x646364 0x151515 +alpha 428 428 400 +rotate -180 180 0 0 +velocityjitter 300 300 600 +velocityoffset 0 0 640 +gravity 0.7 +sizeincrease -40 +airfriction 2 +// sparks nobounce +effect dotc_rart_pexplode +notunderwater +count 6 +type spark +tex 40 40 +color 0xffa35b 0xfff2be +size 3 1 +alpha 644 956 784 +gravity 1 +airfriction 0.2 +velocityoffset 0 0 350 +originjitter 16 16 16 +velocityjitter 124 124 524 +// derbis +effect dotc_rart_pexplode +notunderwater +count 8 +type alphastatic +tex 66 68 +color 0xffa35b 0xfff2be +size 10 23 +alpha 644 756 984 +gravity 1.1 +airfriction 0.2 +sizeincrease -10 +velocityoffset 0 0 400 +originjitter 16 16 16 +velocityjitter 124 124 324 +rotate -180 180 -1000 1000 + +// DOTC Gun artillery drone +// Muzzle flash +// effect dotc_gart_mflash +// Projectile trail +// effect dotc_gart_ptrail +// Projectile explode +// effect dotc_gart_pexplode \ No newline at end of file diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index 97b9ddf96..0e2cbf2b1 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -964,7 +964,7 @@ void(float bIsNewEntity) CSQC_Ent_Update = case ENT_CLIENT_LGBEAM: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_LGBEAM); break; case ENT_CLIENT_GAUNTLET: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_GAUNTLET); break; case ENT_CLIENT_ACCURACY: Ent_ReadAccuracy(); break; - case ENT_CLIENT_AUXILIARYXHAIR: Ent_AuxiliaryXhair(bIsNewEntity); break; + case ENT_CLIENT_AUXILIARYXHAIR: Net_AuXair2(bIsNewEntity); break; default: error(strcat(_("unknown entity type in CSQC_Ent_Update: %d\n"), self.enttype)); break; @@ -1397,6 +1397,14 @@ float CSQC_Parse_TempEntity() Net_WeaponComplain(); bHandled = true; break; + case TE_CSQC_AUXILIARYXHAIR: + Net_AuXair(); + bHandled = true; + break; + case TE_CSQC_VEHICLESETUP: + Net_VehicleSetup(); + bHandled = true; + break; default: // No special logic for this temporary entity; return 0 so the engine can handle it bHandled = false; diff --git a/qcsrc/client/vehicles/vehicles.qc b/qcsrc/client/vehicles/vehicles.qc index 786df248c..5db06c35e 100644 --- a/qcsrc/client/vehicles/vehicles.qc +++ b/qcsrc/client/vehicles/vehicles.qc @@ -4,6 +4,10 @@ #define SPIDER_CROSS "gfx/vehicles/sbot-xhair.tga" #define SPIDER_CROSS2 "gfx/vehicles/sbot-xhair2.tga" +#define axh1 "gfx/vehicles/sbot-xhair2.tga" +#define axh2 "gfx/vehicles/sbot-xhair2.tga" +#define axh3 "gfx/vehicles/sbot-xhair2.tga" + #define spider_h "gfx/vehicles/hud_bg.tga" #define spider_b "gfx/vehicles/sbot.tga" #define spider_r "gfx/vehicles/sbot_rpods.tga" @@ -29,52 +33,138 @@ void CSQC_WAKIZASHI_HUD(); void CSQC_SPIDER_HUD(); void CSQC_RAPTOR_HUD(); -entity AuxiliaryXhair; +#define MAX_AXH 4 +entity AuxiliaryXhair[MAX_AXH]; +const var void Draw_Not(); + +.string axh_image; +.float axh_fadetime; +.float axh_drawflag; +.float axh_scale; + void AuxiliaryXhair_Draw2D() { vector loc, psize; - psize = 0.5 * drawgetimagesize(SPIDER_CROSS2); + psize = self.axh_scale * drawgetimagesize(self.axh_image); loc = project_3d_to_2d(self.origin) - 0.5 * psize; if not (loc_z < 0 || loc_x < 0 || loc_y < 0 || loc_x > vid_conwidth || loc_y > vid_conheight) { loc_z = 0; psize_z = 0; - drawpic(loc, SPIDER_CROSS2, psize, self.colormod, 1, DRAWFLAG_ADDITIVE); + drawpic(loc, self.axh_image, psize, self.colormod, self.alpha, self.axh_drawflag); } - if(time - self.cnt > 0.1) - remove(self); + if(time - self.cnt > self.axh_fadetime) + self.draw2d = Draw_Not; } -void Ent_AuxiliaryXhair(float isNew) -{ - //entity AuxiliaryXhair; - if(isNew) - { - if(AuxiliaryXhair) - remove(AuxiliaryXhair); +void Net_AuXair() +{ + float axh_id; + entity axh; - AuxiliaryXhair = spawn(); - AuxiliaryXhair.draw2d = AuxiliaryXhair_Draw2D; - setmodel(AuxiliaryXhair, "null"); - setsize(AuxiliaryXhair, '0 0 -1', '0 0 -1'); + axh_id = bound(0, ReadByte(), MAX_AXH); + axh = AuxiliaryXhair[axh_id]; + if(axh == world || wasfreed(axh)) // MADNESS? THIS IS QQQQCCCCCCCCC (wasfreed, why do you exsist?) + { + axh = spawn(); + axh.draw2d = Draw_Not; + axh.drawmask = MASK_NORMAL; + axh.axh_drawflag = DRAWFLAG_ADDITIVE; + axh.axh_fadetime = 0.1; + axh.axh_image = "gfx/vehicles/axh-ring.tga"; + axh.axh_scale = 1; + axh.alpha = 1; + AuxiliaryXhair[axh_id] = axh; } - AuxiliaryXhair.origin_x = ReadCoord(); - AuxiliaryXhair.origin_y = ReadCoord(); - AuxiliaryXhair.origin_z = ReadCoord(); + axh.draw2d = AuxiliaryXhair_Draw2D; + + axh.origin_x = ReadCoord(); + axh.origin_y = ReadCoord(); + axh.origin_z = ReadCoord(); - AuxiliaryXhair.colormod_x = ReadByte() / 255; - AuxiliaryXhair.colormod_y = ReadByte() / 255; - AuxiliaryXhair.colormod_z = ReadByte() / 255; + axh.colormod_x = ReadByte() / 255; + axh.colormod_y = ReadByte() / 255; + axh.colormod_z = ReadByte() / 255; + axh.cnt = time; +} +void Net_AuXair2(float blah) +{ + Net_AuXair(); +} +void Net_VehicleSetup() +{ - AuxiliaryXhair.drawmask = MASK_NORMAL; + float hud_id, i; + hud_id = bound(HUD_SPIDERBOT, ReadByte(), HUD_RAPTOR); - AuxiliaryXhair.cnt = time; - //AuxiliaryXhair.solid = SOLID_NOT; + // Init auxiliary crosshairs +//#if 1 + entity axh; + for(i = 0; i < MAX_AXH; ++i) + { + axh = AuxiliaryXhair[i]; + if(axh != world && !wasfreed(axh)) // MADNESS? THIS IS QQQQCCCCCCCCC (wasfreed, why do you exsist?) + remove(axh); + + axh = spawn(); + axh.draw2d = Draw_Not; + axh.drawmask = MASK_NORMAL; + axh.axh_drawflag = DRAWFLAG_ADDITIVE; + axh.axh_fadetime = 0.1; + axh.axh_image = "gfx/vehicles/axh-ring.tga"; + axh.axh_scale = 1; + axh.alpha = 1; + AuxiliaryXhair[i] = axh; + } +/* +#else + for(i = 0; i < MAX_AXH; ++i) + { + if(AuxiliaryXhair[i] != world && !wasfreed(AuxiliaryXhair[i])) + remove(AuxiliaryXhair[i]); + + AuxiliaryXhair[i] = spawn(); + AuxiliaryXhair[i].draw2d = Draw_Not; + AuxiliaryXhair[i].drawmask = MASK_NORMAL; + AuxiliaryXhair[i].axh_drawflag = DRAWFLAG_ADDITIVE; + AuxiliaryXhair[i].axh_fadetime = 0.1; + AuxiliaryXhair[i].axh_image = "gfx/vehicles/axh-ring.tga"; + AuxiliaryXhair[i].axh_scale = 1; + AuxiliaryXhair[i].alpha = 1; + } +#endif +*/ + switch(hud_id) + { + case HUD_SPIDERBOT: + // Minigun1 + AuxiliaryXhair[0].axh_image = "gfx/vehicles/axh-ring.tga"; + AuxiliaryXhair[0].axh_scale = 0.25; + // Minigun2 + AuxiliaryXhair[1].axh_image = "gfx/vehicles/axh-ring.tga"; + AuxiliaryXhair[1].axh_scale = 0.25; + // Rocket + AuxiliaryXhair[2].axh_image = "gfx/vehicles/axh-special1.tga"; + AuxiliaryXhair[2].axh_scale = 0.5; + break; + case HUD_WAKIZASHI: + AuxiliaryXhair[0].axh_image = "gfx/vehicles/axh-bracket.tga"; + AuxiliaryXhair[0].axh_scale = 0.5; + break; + case HUD_RAPTOR: + AuxiliaryXhair[0].axh_image = "gfx/vehicles/axh-cross.tga"; + AuxiliaryXhair[0].axh_scale = 0.5; + AuxiliaryXhair[1].alpha = 0.25; + AuxiliaryXhair[1].axh_image = "gfx/vehicles/axh-ring.tga"; + AuxiliaryXhair[1].axh_scale = 0.5; + AuxiliaryXhair[1].alpha = 0.5; + break; + } } void Vehicles_Precache() @@ -218,10 +308,10 @@ void CSQC_RAPTOR_HUD() energy = min(getstatf(STAT_VEHICLESTAT_ENERGY), 1); // Draw the crosshairs - picsize = drawgetimagesize(raptor_c); - picsize_x *= 0.2; - picsize_y *= 0.2; - drawpic('0.5 0 0' * (vid_conwidth - picsize_x) + '0 0.5 0' * (vid_conheight - picsize_y), raptor_c, picsize, '1 0 0' + '0 1 1' * energy, 0.5, DRAWFLAG_ADDITIVE); + picsize = drawgetimagesize("gfx/vehicles/axh-cross.tga"); + picsize_x *= 0.75; + picsize_y *= 0.75; + drawpic('0.5 0 0' * (vid_conwidth - picsize_x) + '0 0.5 0' * (vid_conheight - picsize_y), "gfx/vehicles/axh-cross.tga", picsize, '1 0 0' + '0 1 1' * energy, 0.5, DRAWFLAG_ADDITIVE); hudloc_y = 4; hudloc_x = 4; diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index fb17f6a0e..58c6e27ca 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -63,6 +63,8 @@ const float TE_CSQC_NOTIFY = 112; const float TE_CSQC_WEAPONCOMPLAIN = 113; const float TE_CSQC_NEX_SCOPE = 116; const float TE_CSQC_MINELAYER_MAXMINES = 117; +const float TE_CSQC_AUXILIARYXHAIR = 118; +const float TE_CSQC_VEHICLESETUP = 119; const float RACE_NET_CHECKPOINT_HIT_QUALIFYING = 0; // byte checkpoint, short time, short recordtime, string recordholder const float RACE_NET_CHECKPOINT_CLEAR = 1; diff --git a/qcsrc/qc-client.cbp b/qcsrc/qc-client.cbp index 70afff46f..06fe424c9 100644 --- a/qcsrc/qc-client.cbp +++ b/qcsrc/qc-client.cbp @@ -6,30 +6,38 @@