countabsolute 1
type decal
tex 47 47
-size 8 8
+size 24 24
alpha 256 256 0
originjitter 12 12 12
-//lightradius 60
-//lightradiusfade 300
+//lightradius 200
+//lightradiusfade 800
//lightcolor 3.2 0.4 4
// purple flare effect
effect crylink_impact
type static
tex 39 39
color 0x504060 0x504060
-size 8 8
+size 24 24
alpha 256 256 512
// purple sparks
effect crylink_impact
-count 10
+count 40
type spark
tex 41 41
color 0xA040C0 0xA040C0
bounce 2
-size 1 2
+size 6 6
alpha 256 256 1024
-velocityjitter 256 256 256
+velocityjitter 512 512 512
// purple splash
effect crylink_impact
count 1.5
type static
color 0xE070FF 0xE070FF
-size 8 8
+size 16 16
alpha 256 256 512
-velocityjitter 8 8 8
+velocityjitter 32 32 32
// purple splash
effect crylink_impact
-count 1.5
+count 3
type static
color 0xE070FF 0xE070FF
-size 8 8
+size 16 16
alpha 256 256 1024
-velocityjitter 32 32 32
+velocityjitter 256 256 256
}
Tuba_Precache();
+ if(autocvar_cl_reticle_item_normal) precache_pic("gfx/reticle_normal");
+ if(autocvar_cl_reticle_item_nex) precache_pic("gfx/reticle_nex");
+
get_mi_min_max_texcoords(1); // try the CLEVER way first
minimapname = strcat("gfx/", mi_shortname, "_radar.tga");
shortmapname = mi_shortname;
else if(activeweapon == WEP_NEX && button_attack2 || activeweapon == WEP_SNIPERRIFLE && button_attack2)
reticle_type = 2; // nex zoom
- if(autocvar_cl_reticle_stretch)
+ if (reticle_type)
{
- reticle_size_x = vid_conwidth;
- reticle_size_y = vid_conheight;
- reticle_pos_x = 0;
- reticle_pos_y = 0;
- }
- else
- {
- reticle_size_x = max(vid_conwidth, vid_conheight);
- reticle_size_y = max(vid_conwidth, vid_conheight);
- reticle_pos_x = (vid_conwidth - reticle_size_x) / 2;
- reticle_pos_y = (vid_conheight - reticle_size_y) / 2;
- }
+ if(autocvar_cl_reticle_stretch)
+ {
+ reticle_size_x = vid_conwidth;
+ reticle_size_y = vid_conheight;
+ reticle_pos_x = 0;
+ reticle_pos_y = 0;
+ }
+ else
+ {
+ reticle_size_x = max(vid_conwidth, vid_conheight);
+ reticle_size_y = max(vid_conwidth, vid_conheight);
+ reticle_pos_x = (vid_conwidth - reticle_size_x) / 2;
+ reticle_pos_y = (vid_conheight - reticle_size_y) / 2;
+ }
- f = current_zoomfraction;
- if(zoomscript_caught)
- f = 1;
- if(autocvar_cl_reticle_item_normal)
- {
- precache_pic("gfx/reticle_normal");
- if(reticle_type == 1 && f)
- drawpic(reticle_pos, "gfx/reticle_normal", reticle_size, '1 1 1', f * autocvar_cl_reticle_item_normal, DRAWFLAG_NORMAL);
- }
- if(autocvar_cl_reticle_item_nex)
- {
- precache_pic("gfx/reticle_nex");
- if(reticle_type == 2 && f)
- drawpic(reticle_pos, "gfx/reticle_nex", reticle_size, '1 1 1', f * autocvar_cl_reticle_item_nex, DRAWFLAG_NORMAL);
+ f = current_zoomfraction;
+ if(zoomscript_caught)
+ f = 1;
+ if(autocvar_cl_reticle_item_normal)
+ {
+ if(reticle_type == 1 && f)
+ drawpic(reticle_pos, "gfx/reticle_normal", reticle_size, '1 1 1', f * autocvar_cl_reticle_item_normal, DRAWFLAG_NORMAL);
+ }
+ if(autocvar_cl_reticle_item_nex)
+ {
+ if(reticle_type == 2 && f)
+ drawpic(reticle_pos, "gfx/reticle_nex", reticle_size, '1 1 1', f * autocvar_cl_reticle_item_nex, DRAWFLAG_NORMAL);
+ }
}
}
// TODO make this configurable
- if(weaponorder_bypriority != autocvar_cl_weaponpriority)
+ if(weaponorder_bypriority != autocvar_cl_weaponpriority || !weaponorder[0])
{
if(weaponorder_bypriority)
strunzone(weaponorder_bypriority);
self.entremove = Ent_RemoveWaypointSprite;
}
+void WaypointSprite_Load_Frames(string ext)
+{
+ float dh, n, i, o, f;
+ string s, sname, sframes;
+ dh = search_begin(strcat("models/sprites/*_frame*", ext), FALSE, FALSE);
+ if (dh < 0)
+ return;
+ float ext_len = strlen(ext);
+ n = search_getsize(dh);
+ for(i = 0; i < n; ++i)
+ {
+ s = search_getfilename(dh, i);
+ s = substring(s, 15, strlen(s) - 15 - ext_len); // strip models/sprites/ and extension
+
+ o = strstrofs(s, "_frame", 0);
+ sname = strcat("/spriteframes/", substring(s, 0, o));
+ sframes = substring(s, o + 6, strlen(s) - o - 6);
+ f = stof(sframes) + 1;
+ db_put(tempdb, sname, ftos(max(f, stof(db_get(tempdb, sname)))));
+ }
+ search_end(dh);
+}
+
void WaypointSprite_Load()
{
waypointsprite_fadedistance = vlen(mi_scale);
if(!waypointsprite_initialized)
{
- float dh, n, i, o, f;
- string s, sname, sframes;
-
- dh = search_begin("models/sprites/*_frame*.tga", FALSE, FALSE);
- n = search_getsize(dh);
- for(i = 0; i < n; ++i)
- {
- s = search_getfilename(dh, i);
- s = substring(s, 15, strlen(s) - 15 - 4); // strip models/sprites/ and .tga
-
- o = strstrofs(s, "_frame", 0);
- sname = strcat("/spriteframes/", substring(s, 0, o));
- sframes = substring(s, o + 6, strlen(s) - o - 6);
- f = stof(sframes) + 1;
- db_put(tempdb, sname, ftos(max(f, stof(db_get(tempdb, sname)))));
- }
- search_end(dh);
-
- dh = search_begin("models/sprites/*_frame*.jpg", FALSE, FALSE);
- n = search_getsize(dh);
- for(i = 0; i < n; ++i)
- {
- s = search_getfilename(dh, i);
- s = substring(s, 15, strlen(s) - 15 - 4); // strip models/sprites/ and .jpg
-
- o = strstrofs(s, "_frame", 0);
- sname = strcat("/spriteframes/", substring(s, 0, o));
- sframes = substring(s, o + 6, strlen(s) - o - 6);
- f = stof(sframes) + 1;
- db_put(tempdb, sname, ftos(max(f, stof(db_get(tempdb, sname)))));
- }
- search_end(dh);
+ WaypointSprite_Load_Frames(".tga");
+ WaypointSprite_Load_Frames(".jpg");
waypointsprite_initialized = true;
}
}
self.clip_load = self.old_clip_load; // restore the ammo counter, in case we still had ammo in the weapon before reloading
// if the gun uses no ammo, max out weapon load, else decrease ammo as we increase weapon load
- if(!self.reload_ammo_min)
+ if(!self.reload_ammo_min || self.items & IT_UNLIMITED_WEAPON_AMMO)
self.clip_load = self.reload_ammo_amount;
else
{
while(self.clip_load < self.reload_ammo_amount && self.(self.current_ammo)) // make sure we don't add more ammo than we have
{
self.clip_load += 1;
- if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
- self.(self.current_ammo) -= 1;
+ self.(self.current_ammo) -= 1;
}
}
self.weapon_load[self.weapon] = self.clip_load;
// no ammo, so nothing to load
if(!self.(self.current_ammo) && self.reload_ammo_min)
+ if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
{
if(clienttype(self) == CLIENTTYPE_REAL && self.reload_complain < time)
{
}
self.crylink_waitrelease = 0;
if(!w_crylink(WR_CHECKAMMO1) && !w_crylink(WR_CHECKAMMO2))
+ if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
{
// ran out of ammo!
self.cnt = WEP_CRYLINK;
if (self.BUTTON_ATCK)
{
if (!weapon_action(self.weapon, WR_CHECKAMMO1))
+ if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
{
W_SwitchWeapon_Force(self, w_getbestweapon(self));
w_ready();
{
local entity gren;
- if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
- W_DecreaseAmmo(ammo_cells, autocvar_g_balance_hook_secondary_ammo, FALSE);
+ W_DecreaseAmmo(ammo_cells, autocvar_g_balance_hook_secondary_ammo, FALSE);
W_SetupShot (self, FALSE, 4, "weapons/hookbomb_fire.wav", CHAN_WEAPON, autocvar_g_balance_hook_secondary_damage);
gren = spawn ();
if (time > self.hook_refire)
if (weapon_prepareattack(0, -1))
{
- if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
- W_DecreaseAmmo(ammo_fuel, autocvar_g_balance_hook_primary_fuel, FALSE);
+ W_DecreaseAmmo(ammo_fuel, autocvar_g_balance_hook_primary_fuel, FALSE);
self.hook_state |= HOOK_FIRING;
weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_hook_primary_animtime, w_ready);
}
if (self.BUTTON_ATCK)
{
if (!weapon_action(self.weapon, WR_CHECKAMMO2))
+ if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
{
W_SwitchWeapon_Force(self, w_getbestweapon(self));
w_ready();
}
if (!weapon_action(self.weapon, WR_CHECKAMMO1))
+ if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
{
W_SwitchWeapon_Force(self, w_getbestweapon(self));
w_ready();