self.colormod = '-0.5 -0.5 -0.5';
self.touch = raptor_blowup;
- self.think = raptor_spawn;
- self.nextthink = time + autocvar_g_vehicle_raptor_respawntime;
+ //self.think = raptor_spawn;
+ //self.nextthink = time + autocvar_g_vehicle_raptor_respawntime;
}
void raptor_spawn()
self.flags = FL_NOTARGET;
self.effects = 0;
+ self.frame = 0;
self.vehicle_health = autocvar_g_vehicle_raptor_health;
self.vehicle_shield = autocvar_g_vehicle_raptor_shield;
- self.event_damage = vehicles_damage;
- self.touch = vehicles_touch;
- self.iscreature = TRUE;
- self.movetype = MOVETYPE_FLY;
+ self.movetype = MOVETYPE_TOSS;
self.solid = SOLID_BBOX;
- self.takedamage = DAMAGE_AIM;
- self.deadflag = DEAD_NO;
- self.bot_attack = TRUE;
self.vehicle_energy = 1;
- self.vehicle_hudmodel.viewmodelforclient = self;
self.bomb1.gun1.avelocity_y = 90;
self.bomb1.gun2.avelocity_y = -90;
- self.frame = 0;
-
- setorigin(self, self.pos1);
- self.angles = self.pos2;
setsize(self, RAPTOR_MIN, RAPTOR_MAX );
- pointparticles(particleeffectnum("teleport"), self.origin + '0 0 64', '0 0 0', 1);
self.delay = time;
-
- vehicles_reset_colors();
}
void raptor_dinit()
float autocvar_g_vehicle_spiderbot_respawntime;
-float autocvar_g_vehicle_spiderbot_crush_dmg;
-float autocvar_g_vehicle_spiderbot_crush_force;
+//float autocvar_g_vehicle_spiderbot_crush_dmg;
+//float autocvar_g_vehicle_spiderbot_crush_force;
+
+float autocvar_g_vehicle_spiderbot_speed_stop;
+float autocvar_g_vehicle_spiderbot_speed_strafe;
+float autocvar_g_vehicle_spiderbot_speed_walk;
+float autocvar_g_vehicle_spiderbot_turnspeed;
+float autocvar_g_vehicle_spiderbot_movement_inertia;
+
+float autocvar_g_vehicle_spiderbot_springlength;
+float autocvar_g_vehicle_spiderbot_springup;
+float autocvar_g_vehicle_spiderbot_springblend;
float autocvar_g_vehicle_spiderbot_head_pitchlimit_down;
float autocvar_g_vehicle_spiderbot_head_pitchlimit_up;
float autocvar_g_vehicle_spiderbot_shield_regen;
float autocvar_g_vehicle_spiderbot_shield_regen_pause;
-float autocvar_g_vehicle_spiderbot_minigun_cooldown;
float autocvar_g_vehicle_spiderbot_minigun_damage;
-float autocvar_g_vehicle_spiderbot_minigun_heat;
float autocvar_g_vehicle_spiderbot_minigun_refire;
float autocvar_g_vehicle_spiderbot_minigun_spread;
-float autocvar_g_vehicle_spiderbot_movement_inertia;
+float autocvar_g_vehicle_spiderbot_minigun_cooldown;
+float autocvar_g_vehicle_spiderbot_minigun_heat;
float autocvar_g_vehicle_spiderbot_rocket_damage;
float autocvar_g_vehicle_spiderbot_rocket_edgedamage;
float autocvar_g_vehicle_spiderbot_rocket_speed;
float autocvar_g_vehicle_spiderbot_rocket_turnrate;
-float autocvar_g_vehicle_spiderbot_shield;
-float autocvar_g_vehicle_spiderbot_speed_stop;
-float autocvar_g_vehicle_spiderbot_speed_strafe;
-float autocvar_g_vehicle_spiderbot_speed_walk;
-float autocvar_g_vehicle_spiderbot_turnspeed;
-
-
-float autocvar_g_vehicle_spiderbot_springlength;
-float autocvar_g_vehicle_spiderbot_springup;
-float autocvar_g_vehicle_spiderbot_springblend;
void spiderbot_exit(float eject);
void spiderbot_enter();
ad_y = bound(-ftmp, ad_y, ftmp);
spider.tur_head.angles_y = bound(autocvar_g_vehicle_spiderbot_head_turnlimit * -1, spider.tur_head.angles_y + ad_y, autocvar_g_vehicle_spiderbot_head_turnlimit);
+
// Pitch head
+ ad = vectoangles(normalize(trace_endpos - gettaginfo(spider.tur_head,gettagindex(spider.tur_head,"tag_hud")))) - (spider.tur_head.angles + spider.angles);
+ if(ad_x > 180) ad_x -= 360;
+ if(ad_x < -180) ad_x += 360;
+
+
ftmp = autocvar_g_vehicle_spiderbot_head_pitchspeed * sys_frametime;
ad_x = bound(ftmp * -1, ad_x, ftmp);
spider.tur_head.angles_x = bound(autocvar_g_vehicle_spiderbot_head_pitchlimit_down, spider.tur_head.angles_x + ad_x, autocvar_g_vehicle_spiderbot_head_pitchlimit_up);
+
+
// Turn Body
ftmp = autocvar_g_vehicle_spiderbot_turnspeed * sys_frametime;
ftmp = bound(-ftmp, spider.tur_head.angles_y, ftmp);
void spiderbot_spawn()
{
self.frame = 5;
+ self.tur_head.frame = 1;
self.think = spiderbot_think;
self.nextthink = time;
- self.owner = world;
self.vehicle_health = autocvar_g_vehicle_spiderbot_health;
self.vehicle_shield = autocvar_g_vehicle_spiderbot_shield;
- self.event_damage = vehicles_damage;
- self.iscreature = TRUE;
self.movetype = MOVETYPE_WALK;
self.solid = SOLID_SLIDEBOX;
- self.takedamage = DAMAGE_AIM;
- self.touch = vehicles_touch;
self.alpha = self.tur_head.alpha = self.gun1.alpha = self.gun2.alpha = 1;
self.tur_head.angles = '0 0 0';
- self.deadflag = DEAD_NO;
- self.bot_attack = TRUE;
- self.flags |= FL_NOTARGET;
- self.tur_head.frame = 1;
- self.vehicle_hudmodel.viewmodelforclient = self;
setorigin(self, self.pos1 + '0 0 128');
self.angles = self.pos2;
-
- vehicles_reset_colors();
}
void spiderbot_headfade()
RadiusDamage (self, self, 250, 15, 250, world, 250, DEATH_SBBLOWUP, world);
self.alpha = self.tur_head.alpha = self.gun1.alpha = self.gun2.alpha = -1;
- self.nextthink = time + autocvar_g_vehicle_spiderbot_respawntime;
- self.think = spiderbot_spawn;
self.movetype = MOVETYPE_NONE;
self.deadflag = DEAD_DEAD;
self.solid = SOLID_NOT;
self.tur_head.effects &~= EF_FLAME;
self.vehicle_hudmodel.viewmodelforclient = self;
+ //self.nextthink = time + autocvar_g_vehicle_spiderbot_respawntime;
+ //self.think = spiderbot_spawn;
+
//setorigin(self, self.tur_aimpos);
}
void vehicles_touch();
void vehicles_reset_colors();
void vehicles_clearrturn();
-void vehicles_setreturn(float retime, void() respawn_proc);
+void vehicles_setreturn();
#define MAX_AXH 4
void vehicles_spawn()
{
dprint("Spawning vehicle: ", self.netname, "\n");
+
self.vehicle_hudmodel.viewmodelforclient = self;
self.owner = world;
+ self.touch = vehicles_touch;
self.event_damage = vehicles_damage;
self.iscreature = TRUE;
self.movetype = MOVETYPE_WALK;
self.solid = SOLID_SLIDEBOX;
self.takedamage = DAMAGE_AIM;
- self.touch = vehicles_touch;
self.deadflag = DEAD_NO;
self.bot_attack = TRUE;
self.flags = FL_NOTARGET;
if(self.team != other.team)
return;
+ self.vehicle_ammo1 = 0;
+ self.vehicle_ammo2 = 0;
+ self.vehicle_reload1 = 0;
+ self.vehicle_reload2 = 0;
+ self.vehicle_energy = 0;
+
self.owner = other;
self.switchweapon = other.switchweapon;
self.vehicle_hudmodel.viewmodelforclient = self;
self.tur_head.nodrawtoclient = self;
- vehicles_setreturn(self.vehicle_respawntime, self.vehicle_spawn);
+ vehicles_setreturn();
self.phase = time + 1;
self.team = 0;
self.vehicle_exit(eject);
-
self.owner = world;
}
vehicles_exit(VHEF_RELESE);
self.vehicle_die();
+ vehicles_setreturn();
}
}
void vehicles_return()
{
pointparticles(particleeffectnum("teleport"), self.enemy.origin + '0 0 64', '0 0 0', 1);
- self.enemy.think = self.use; // This is the vehicles respwn procedure
+
+ self.enemy.think = vehicles_spawn;
self.enemy.nextthink = time;
+
remove(self);
}
{
if(ret.enemy == self)
{
- ret.think = SUB_Remove;
- ret.nextthink = time + 0.1;
+ ret.classname = "";
+ ret.think = SUB_Remove;
+ ret.nextthink = time + 0.1;
return;
}
+
ret = ret.chain;
}
}
-void vehicles_setreturn(float retime, void() respawn_proc)
+void vehicles_setreturn()
{
+ entity ret;
+
vehicles_clearrturn();
- if (self.deadflag == DEAD_NO)
- {
- entity ret;
-
- ret = spawn();
- ret.classname = "vehicle_return";
- ret.enemy = self;
- ret.think = vehicles_return;
- ret.nextthink = time + retime;
- ret.use = respawn_proc;
- }
+ ret = spawn();
+ ret.classname = "vehicle_return";
+ ret.enemy = self;
+ ret.think = vehicles_return;
+ ret.nextthink = time + self.vehicle_respawntime;
}
float vehicles_customizeentityforclient()