- METHOD(Spiderbot, vr_impact, void(Spiderbot thisveh))
- {
- if(autocvar_g_vehicle_spiderbot_bouncepain)
- vehicles_impact(autocvar_g_vehicle_spiderbot_bouncepain_x, autocvar_g_vehicle_spiderbot_bouncepain_y, autocvar_g_vehicle_spiderbot_bouncepain_z);
- }
- METHOD(Spiderbot, vr_enter, void(Spiderbot thisveh))
- {
- self.vehicle_weapon2mode = SBRM_GUIDE;
- self.movetype = MOVETYPE_WALK;
- CSQCVehicleSetup(self.owner, 0);
- self.owner.vehicle_health = (self.vehicle_health / autocvar_g_vehicle_spiderbot_health) * 100;
- self.owner.vehicle_shield = (self.vehicle_shield / autocvar_g_vehicle_spiderbot_shield) * 100;
-
- if(self.owner.flagcarried)
- {
- setattachment(self.owner.flagcarried, self.tur_head, "");
- setorigin(self.owner.flagcarried, '-20 0 120');
- }
- }
- METHOD(Spiderbot, vr_think, void(Spiderbot thisveh))
- {
- if(self.flags & FL_ONGROUND)
- movelib_beak_simple(autocvar_g_vehicle_spiderbot_speed_stop);
- }
- METHOD(Spiderbot, vr_death, void(Spiderbot thisveh))
- {
- self.health = 0;
- self.event_damage = func_null;
- self.takedamage = DAMAGE_NO;
- self.touch = func_null;
- self.cnt = 3.4 + time + random() * 2;
- self.think = spiderbot_blowup;
- self.nextthink = time;
- self.deadflag = DEAD_DYING;
- self.frame = 5;
- self.tur_head.effects |= EF_FLAME;
- self.colormod = self.tur_head.colormod = '-1 -1 -1';
- self.frame = 10;
- self.movetype = MOVETYPE_TOSS;
-
- CSQCModel_UnlinkEntity(self); // networking the death scene would be a nightmare
- }
- METHOD(Spiderbot, vr_spawn, void(Spiderbot thisveh))
- {
- if(!self.gun1)
- {
- self.vehicles_impulse = spiderbot_impulse;
- self.gun1 = spawn();
- self.gun2 = spawn();
- setmodel(self.gun1, MDL_VEH_SPIDERBOT_GUN);
- setmodel(self.gun2, MDL_VEH_SPIDERBOT_GUN);
- setattachment(self.gun1, self.tur_head, "tag_hardpoint01");
- setattachment(self.gun2, self.tur_head, "tag_hardpoint02");
- self.gravity = 2;
- self.mass = 5000;
- }
-
- self.frame = 5;
- self.tur_head.frame = 1;
- self.movetype = MOVETYPE_WALK;
- self.solid = SOLID_SLIDEBOX;
- self.alpha = self.tur_head.alpha = self.gun1.alpha = self.gun2.alpha = 1;
- self.tur_head.angles = '0 0 0';
- self.vehicle_exit = spiderbot_exit;
-
- setorigin(self, self.pos1 + '0 0 128');
- self.angles = self.pos2;
- self.damageforcescale = 0.03;
- self.vehicle_health = autocvar_g_vehicle_spiderbot_health;
- self.vehicle_shield = autocvar_g_vehicle_spiderbot_shield;
-
- self.PlayerPhysplug = spiderbot_frame;
- }
- METHOD(Spiderbot, vr_setup, void(Spiderbot thisveh))
- {
- if(autocvar_g_vehicle_spiderbot_shield)
- self.vehicle_flags |= VHF_HASSHIELD;
+METHOD(Spiderbot, vr_impact, void(Spiderbot thisveh, entity instance))
+{
+ if(autocvar_g_vehicle_spiderbot_bouncepain)
+ vehicles_impact(instance, autocvar_g_vehicle_spiderbot_bouncepain_x, autocvar_g_vehicle_spiderbot_bouncepain_y, autocvar_g_vehicle_spiderbot_bouncepain_z);
+}
+METHOD(Spiderbot, vr_enter, void(Spiderbot thisveh, entity instance))
+{
+ instance.vehicle_weapon2mode = SBRM_GUIDE;
+ instance.movetype = MOVETYPE_WALK;
+ CSQCVehicleSetup(instance.owner, 0);
+ instance.owner.vehicle_health = (instance.vehicle_health / autocvar_g_vehicle_spiderbot_health) * 100;
+ instance.owner.vehicle_shield = (instance.vehicle_shield / autocvar_g_vehicle_spiderbot_shield) * 100;
+
+ if(instance.owner.flagcarried)
+ {
+ setattachment(instance.owner.flagcarried, instance.tur_head, "");
+ setorigin(instance.owner.flagcarried, '-20 0 120');
+ }
+}
+METHOD(Spiderbot, vr_think, void(Spiderbot thisveh, entity instance))
+{
+ if(IS_ONGROUND(instance))
+ movelib_brake_simple(instance, autocvar_g_vehicle_spiderbot_speed_stop);
+}
+METHOD(Spiderbot, vr_death, void(Spiderbot thisveh, entity instance))
+{
+ instance.health = 0;
+ instance.event_damage = func_null;
+ instance.takedamage = DAMAGE_NO;
+ settouch(instance, func_null);
+ instance.cnt = 3.4 + time + random() * 2;
+ setthink(instance, spiderbot_blowup);
+ instance.nextthink = time;
+ instance.deadflag = DEAD_DYING;
+ instance.frame = 5;
+ instance.tur_head.effects |= EF_FLAME;
+ instance.colormod = instance.tur_head.colormod = '-1 -1 -1';
+ instance.frame = 10;
+ instance.movetype = MOVETYPE_TOSS;
+
+ CSQCModel_UnlinkEntity(instance); // networking the death scene would be a nightmare
+}
+METHOD(Spiderbot, vr_spawn, void(Spiderbot thisveh, entity instance))
+{
+ if(!instance.gun1)
+ {
+ instance.vehicles_impulse = spiderbot_impulse;
+ instance.gun1 = spawn();
+ instance.gun2 = spawn();
+ setmodel(instance.gun1, MDL_VEH_SPIDERBOT_GUN);
+ setmodel(instance.gun2, MDL_VEH_SPIDERBOT_GUN);
+ setattachment(instance.gun1, instance.tur_head, "tag_hardpoint01");
+ setattachment(instance.gun2, instance.tur_head, "tag_hardpoint02");
+ instance.gravity = 2;
+ instance.mass = 5000;
+ }
+
+ instance.frame = 5;
+ instance.tur_head.frame = 1;
+ instance.movetype = MOVETYPE_WALK;
+ instance.solid = SOLID_SLIDEBOX;
+ instance.alpha = instance.tur_head.alpha = instance.gun1.alpha = instance.gun2.alpha = 1;
+ instance.tur_head.angles = '0 0 0';
+ instance.vehicle_exit = spiderbot_exit;
+
+ setorigin(instance, instance.pos1 + '0 0 128');
+ instance.angles = instance.pos2;
+ instance.damageforcescale = 0.03;
+ instance.vehicle_health = autocvar_g_vehicle_spiderbot_health;
+ instance.vehicle_shield = autocvar_g_vehicle_spiderbot_shield;
+
+ instance.PlayerPhysplug = spiderbot_frame;
+}
+METHOD(Spiderbot, vr_setup, void(Spiderbot thisveh, entity instance))
+{
+ if(autocvar_g_vehicle_spiderbot_shield)
+ instance.vehicle_flags |= VHF_HASSHIELD;