float movedt;
vector where;
-
- if(!dropmark)
- {
- dropmark = spawn();
- dropmark.owner = self;
- }
-
// Fetch health & ammo stats
hp = bound(0,getstatf(STAT_VEHICLESTAT_HEALTH), 1);
shield = bound(0,getstatf(STAT_VEHICLESTAT_SHIELD), 1);
drawpic(hudloc, raptor_g1, picsize, '1 1 1' * energy + '1 0 0' * (1 - energy), 1, DRAWFLAG_NORMAL);
drawpic(hudloc, raptor_g2, picsize, '1 1 1' * reload + '1 0 0' * (1 - reload), 1, DRAWFLAG_NORMAL);
+ if(!dropmark)
+ {
+ dropmark = spawn();
+ dropmark.owner = self;
+ }
+
if(reload == 1)
{
where = dropmark.origin;
picsize_y *= autocvar_cl_vehicle_spiderbot_cross_size;
drawpic('0.5 0 0' * (vid_conwidth - picsize_x) + '0 0.5 0' * (vid_conheight - picsize_y), SPIDER_CROSS, picsize, '1 1 1', autocvar_cl_vehicle_spiderbot_cross_alpha, DRAWFLAG_NORMAL);
-/*
-const float STAT_VEHICLESTAT_HEALTH = 60;
-const float STAT_VEHICLESTAT_SHIELD = 61;
-const float STAT_VEHICLESTAT_ENERGY = 62;
-const float STAT_VEHICLESTAT_AMMO1 = 63;
-const float STAT_VEHICLESTAT_RELAOD1 = 64;
-const float STAT_VEHICLESTAT_AMMO2 = 65;
-const float STAT_VEHICLESTAT_RELOAD2 = 66;
-*/
health = min(getstatf(STAT_VEHICLESTAT_HEALTH), 1);
shield = min(getstatf(STAT_VEHICLESTAT_SHIELD), 1);
energy = min(getstatf(STAT_VEHICLESTAT_ENERGY), 1);
drawpic(hudloc, waki_r, picsize, '1 1 1' * rockets + '1 0 0' * (1 - rockets), 1, DRAWFLAG_NORMAL);
drawpic(hudloc, waki_e, picsize, '1 1 1' * energy + '1 0 0' * (1 - energy), 1, DRAWFLAG_NORMAL);
-
-
- /*
- p = '0.5 0 0' * (vid_conwidth - (rkt_size * 8));
- p = p + '0 1 0' * vid_conheight - '0 32 0';
-
- // Draw health bar
- p_y += 8;
- drawfill(p, '256 0 0' * health + '0 8 0' , '0 0.7 0', 0.75, DRAWFLAG_NORMAL);
- p_x += 256 * health;
- drawfill(p, '256 0 0' * (1 - health) + '0 8 0' , '0 0 0', 0.75, DRAWFLAG_NORMAL);
-
- // Draw shiled bar
- p_x -= 256 * health;
- p_y += 4;
- drawfill(p, '256 0 0' * shield + '0 4 0' , '0.25 0.25 1', 0.5, DRAWFLAG_NORMAL);
-
- // Draw energy
- //p_x -= 256 * health;
- p_y -= 8;
- drawfill(p, '256 0 0' * energy + '0 4 0' , '1 1 1', 0.75, DRAWFLAG_NORMAL);
-
- // Draw rockets bar
- p_y += 12;
- drawfill(p, '256 0 0' * rockets + '0 4 0' , '1 0 0', 0.75, DRAWFLAG_NORMAL);
- */
-
-
-
-
if (scoreboard_showscores)
{
HUD_DrawScoreboard();
return vlen(self.origin - trace_endpos);
}
-void raptor_bombs_return()
-{
- self.owner.bomb1.alpha = 1;
- self.owner.bomb2.alpha = 1;
- remove(self);
-}
-
void raptor_bomblet_boom()
{
if(other == self.owner || other.owner == self.owner)
void raptor_bomb_burst()
{
- self.angles = vectoangles(self.velocity);
-
-
if(autocvar_g_vehicle_raptor_bomblet_alt)
{
self.nextthink = time;
}
entity bomblet;
- float i,v;
- vector d;
+ float i;
- v = vlen(self.velocity);
- d = normalize(self.velocity);
pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
for(i = 0; i < autocvar_g_vehicle_raptor_bomblets; ++i)
{
-
bomblet = spawn();
- setorigin(bomblet,self.origin);
-
- //setmodel(bomblet,"models/vehicles/raptor_bomb.dpm");
- bomblet.scale = 0.5;
+ setorigin(bomblet, self.origin);
+ bomblet.scale = 0.5;
bomblet.solid = SOLID_TRIGGER;
bomblet.movetype = MOVETYPE_BOUNCE;
bomblet.touch = raptor_bomblet_boom;
bomblet.think = raptor_bomblet_boom;
bomblet.nextthink = time + 5;
bomblet.owner = self.owner;
+ bomblet.velocity = normalize(normalize(self.velocity) + (randomvec() * autocvar_g_vehicle_raptor_bomblet_spread)) * vlen(self.velocity);
- //bomblet.modelflags = MF_GRENADE;
-
- bomblet.velocity = normalize(d + (randomvec() * autocvar_g_vehicle_raptor_bomblet_spread)) * v;
-
- //bomblet.angles = vectoangles(bomblet.velocity);
CSQCProjectile(bomblet, TRUE, PROJECTILE_RAPTORBOMB, TRUE);
}
{
entity bomb_1, bomb_2;
- self.bomb1.alpha = 0.25;
- self.bomb2.alpha = 0.25;
+ //self.bomb1.alpha = 0;
+ //self.bomb2.alpha = 0;
bomb_1 = spawn();
bomb_2 = spawn();
else
bomb_1.nextthink = bomb_2.nextthink = time + autocvar_g_vehicle_raptor_bomblet_time;
- //bomb_1.avelocity = bomb_2.avelocity = '0 0 180';
bomb_1.owner = bomb_2.owner = self;
bomb_1.enemy = bomb_2.enemy = self.owner;
- //bomb_1.angles = bomb_2.angles = self.angles;
bomb_1.solid = bomb_2.solid = SOLID_BBOX;
CSQCProjectile(bomb_1, TRUE, PROJECTILE_RAPTORBOMB, TRUE);
CSQCProjectile(bomb_2, TRUE, PROJECTILE_RAPTORBOMB, TRUE);
- bomb_1 = spawn();
- bomb_1.owner = self;
- bomb_1.think = raptor_bombs_return;
- bomb_1.nextthink = time + autocvar_g_vehicle_raptor_bombs_refire;
}
void raptor_bolt_explode()
else
makevectors(player.v_angle);
*/
+
crosshair_trace(player);
//df = vectoangles(normalize(trace_endpos - gettaginfo(raptor ,gettagindex(raptor, "tag_hud"))) - raptor.angles);
df = vectoangles(normalize(trace_endpos - self.origin + '0 0 32'));
player.vehicle_energy = raptor.vehicle_energy / autocvar_g_vehicle_raptor_energy;
+
if(time > raptor.delay)
- if(player.BUTTON_ATCK2)
{
- raptor_bombdrop();
- raptor.delay = time + autocvar_g_vehicle_raptor_bombs_refire;
- raptor.lip = time;
+ if(player.BUTTON_ATCK2)
+ {
+ raptor_bombdrop();
+ raptor.delay = time + autocvar_g_vehicle_raptor_bombs_refire;
+ }
+ player.vehicle_reload1 = 1;
+ }
+ else
+ {
+ player.vehicle_reload1 = min(time / raptor.delay, 1);
+ raptor.bomb1.alpha = raptor.bomb2.alpha = player.vehicle_reload1; //(player.vehicle_reload1 == 1 ? 1 : player.vehicle_reload1 * 0.25);
}
- player.vehicle_reload1 = (time - raptor.lip) / (raptor.delay - raptor.lip);
+
+
VEHICLE_UPDATE_PLAYER(health, raptor);
if(self.vehicle_flags & VHF_HASSHIELD)
self.movetype = MOVETYPE_FLY;
self.solid = SOLID_SLIDEBOX;
self.takedamage = DAMAGE_AIM;
- self.alpha = 1;
- self.colormap = 1024;
self.deadflag = DEAD_NO;
self.bot_attack = TRUE;
- self.colormod = '1 1 1';
- self.avelocity = '0 0 0';
- self.velocity = '0 0 0';
self.vehicle_energy = 1;
self.vehicle_hudmodel.viewmodelforclient = self;
setattachment(self.bomb1, self,"bombmount_left");
setattachment(self.bomb2, self,"bombmount_right");
+
// FIXME Guns mounts to angled bones
+ self.bomb1.angles = self.angles;
+ self.angles = '0 0 0';
// This messes up gun-aim, so work arround it.
//setattachment(self.gun1, self, "gunmount_left");
ofs = gettaginfo(self, gettagindex(self, "gunmount_left"));
setattachment(self.gun2, self, "");
setorigin(self.gun2, ofs);
+ self.angles = self.bomb1.angles;
+ self.bomb1.angles = '0 0 0';
+
+
spinner = spawn();
spinner.owner = self;
setmodel(spinner,"models/vehicles/spinner.dpm");
_effects = EF_NODEPTHTEST;
if(autocvar_g_fullbrightplayers)
- _colormap |= EF_FULLBRIGHT;
+ _effects |= EF_FULLBRIGHT;
if(self.team)
_colormap = 1024 + (self.team - 1) * 17;
else
_colormap = 1024;
- _glowmod = '0 0 0';
- _colormod = '0 0 0';
+ _glowmod = '0 0 0';
+ _colormod = '0 0 0';
+ // Find all ents attacked to main model and setup effects, colormod etc.
e = findchainentity(tag_entity, self);
while(e)
{
- e.colormap = _colormap;
- e.effects = _effects;
- e.colormod = _colormod;
- e.colormap = _colormap;
+ e.effects = _effects;
+ e.colormod = _colormod;
+ e.colormap = _colormap;
+ e.alpha = 1;
+
e = e.chain;
}
self.effects = _effects;
- self.colormap = _colormap;
self.colormod = _colormod;
self.colormap = _colormap;
+
+ self.alpha = 1;
+ self.avelocity = '0 0 0';
+ self.velocity = '0 0 0';
+
}
float vehicle_initialize(string net_name,