setorigin(this, vehic.origin + '0 0 32');
this.oldorigin = this.origin; // negate fall damage
- this.vehicle_weapon2mode = vehic.vehicle_weapon2mode;
+ STAT(VEHICLESTAT_W2MODE, this) = STAT(VEHICLESTAT_W2MODE, vehic);
vector vf, ad;
// Target lock & predict
Weapon wep2a = WEP_RAPTOR_BOMB;
if(!forbidWeaponUse(this))
- if(vehic.vehicle_weapon2mode == RSM_BOMB)
+ if(STAT(VEHICLESTAT_W2MODE, vehic) == RSM_BOMB)
{
if(time > vehic.lip + autocvar_g_vehicle_raptor_bombs_refire)
if(PHYS_INPUT_BUTTON_ATCK2(this))
else
this.PlayerPhysplug = raptor_frame;
- this.vehicle_weapon2mode = vehic.vehicle_weapon2mode;
+ STAT(VEHICLESTAT_W2MODE, this) = STAT(VEHICLESTAT_W2MODE, vehic);
if(vehic.vehicle_flags & VHF_SHIELDREGEN)
vehicles_regen(vehic, vehic.dmg_time, vehicle_shield, autocvar_g_vehicle_raptor_shield, autocvar_g_vehicle_raptor_shield_regen_pause, autocvar_g_vehicle_raptor_shield_regen, dt, true);
{
this.deadflag = DEAD_DEAD;
this.vehicle_exit(this, VHEF_NORMAL);
- RadiusDamage (this, this.enemy, 250, 15, 250, NULL, NULL, 250, DEATH_VH_RAPT_DEATH.m_id, NULL);
+ RadiusDamage (this, this.enemy, 250, 15, 250, NULL, NULL, 250, DEATH_VH_RAPT_DEATH.m_id, DMG_NOWEP, NULL);
this.alpha = -1;
set_movetype(this, MOVETYPE_NONE);
switch(_imp)
{
case IMP_weapon_group_1.impulse:
- this.vehicle.vehicle_weapon2mode = RSM_BOMB;
+ STAT(VEHICLESTAT_W2MODE, this.vehicle) = RSM_BOMB;
CSQCVehicleSetup(this, 0);
return true;
case IMP_weapon_group_2.impulse:
- this.vehicle.vehicle_weapon2mode = RSM_FLARE;
+ STAT(VEHICLESTAT_W2MODE, this.vehicle) = RSM_FLARE;
CSQCVehicleSetup(this, 0);
return true;
case IMP_weapon_next_byid.impulse:
case IMP_weapon_next_bypriority.impulse:
case IMP_weapon_next_bygroup.impulse:
- this.vehicle.vehicle_weapon2mode += 1;
- if(this.vehicle.vehicle_weapon2mode > RSM_LAST)
- this.vehicle.vehicle_weapon2mode = RSM_FIRST;
+ STAT(VEHICLESTAT_W2MODE, this.vehicle) += 1;
+ if(STAT(VEHICLESTAT_W2MODE, this.vehicle) > RSM_LAST)
+ STAT(VEHICLESTAT_W2MODE, this.vehicle) = RSM_FIRST;
CSQCVehicleSetup(this, 0);
return true;
case IMP_weapon_prev_byid.impulse:
case IMP_weapon_prev_bypriority.impulse:
case IMP_weapon_prev_bygroup.impulse:
- this.vehicle.vehicle_weapon2mode -= 1;
- if(this.vehicle.vehicle_weapon2mode < RSM_FIRST)
- this.vehicle.vehicle_weapon2mode = RSM_LAST;
+ STAT(VEHICLESTAT_W2MODE, this.vehicle) -= 1;
+ if(STAT(VEHICLESTAT_W2MODE, this.vehicle) < RSM_FIRST)
+ STAT(VEHICLESTAT_W2MODE, this.vehicle) = RSM_LAST;
CSQCVehicleSetup(this, 0);
return true;
}
METHOD(Raptor, vr_enter, void(Raptor thisveh, entity instance))
{
- instance.vehicle_weapon2mode = RSM_BOMB;
+ STAT(VEHICLESTAT_W2MODE, instance) = RSM_BOMB;
instance.owner.PlayerPhysplug = raptor_takeoff;
set_movetype(instance, MOVETYPE_BOUNCEMISSILE);
instance.solid = SOLID_SLIDEBOX;
}
METHOD(Raptor, vr_death, void(Raptor thisveh, entity instance))
{
- instance.health = 0;
+ SetResourceAmountExplicit(instance, RESOURCE_HEALTH, 0);
instance.event_damage = func_null;
instance.solid = SOLID_CORPSE;
instance.takedamage = DAMAGE_NO;