ATTRIB(GameItem, m_color, vector, '1 1 1')
ATTRIB(GameItem, m_waypoint, string, string_null)
ATTRIB(GameItem, m_waypointblink, int, 1)
- METHOD(GameItem, display, void(entity this, void(string name, string icon) returns)) {
+ METHOD(GameItem, display, void(GameItem this, void(string name, string icon) returns)) {
returns(this.m_name, this.m_icon ? sprintf("/gfx/hud/%s/%s", cvar_string("menu_skin"), this.m_icon) : string_null);
}
- METHOD(GameItem, show, void(entity this)) { LOG_INFO("A game item\n"); }
- void ITEM_HANDLE(Show, entity this) { this.show(this); }
+ METHOD(GameItem, show, void(GameItem this)) { LOG_INFO("A game item\n"); }
+ void ITEM_HANDLE(Show, GameItem this) { this.show(this); }
ENDCLASS(GameItem)
#endif
ATTRIB(Pickup, m_sound, Sound, SND_ITEMPICKUP)
#endif
ATTRIB(Pickup, m_name, string, string_null)
- METHOD(Pickup, show, void(entity this));
- void Pickup_show(entity this) { LOG_INFOF("%s: %s\n", etos(this), this.m_name); }
+ METHOD(Pickup, show, void(Pickup this)) { LOG_INFOF("%s: %s\n", etos(this), this.m_name); }
#ifdef SVQC
ATTRIB(Pickup, m_mins, vector, '-16 -16 0')
ATTRIB(Pickup, m_maxs, vector, '16 16 32')
ATTRIB(Pickup, m_respawntime, float(), func_null)
ATTRIB(Pickup, m_respawntimejitter, float(), func_null)
float Item_GiveTo(entity item, entity player);
- METHOD(Pickup, giveTo, bool(entity this, entity item, entity player))
+ METHOD(Pickup, giveTo, bool(Pickup this, entity item, entity player))
{
bool b = Item_GiveTo(item, player);
if (b) {
}
return b;
}
- bool ITEM_HANDLE(Pickup, entity this, entity item, entity player);
+ bool ITEM_HANDLE(Pickup, Pickup this, entity item, entity player);
#endif
ENDCLASS(Pickup)
AuxiliaryXhair[1].axh_image = vCROSS_BURST; // Raygun
} else {
Vehicle info = Vehicles_from(hud_id);
- info.vr_setup(info);
+ info.vr_setup(info, NULL);
}
}
antilag_clear(self);
Vehicle info = Vehicles_from(self.vehicleid);
- info.vr_death(info);
+ info.vr_death(info, self);
vehicles_setreturn(self);
}
}
if(self.play_time < time) {
Vehicle info = Vehicles_from(self.vehicleid);
- info.vr_impact(info);
+ info.vr_impact(info, self);
}
return;
setself(veh);
CSQCModel_UnlinkEntity(veh);
Vehicle info = Vehicles_from(veh.vehicleid);
- info.vr_enter(info);
+ info.vr_enter(info, veh);
setself(this);
antilag_clear(pl);
self.owner.vehicle_weapon2mode = self.vehicle_weapon2mode;
Vehicle info = Vehicles_from(self.vehicleid);
- info.vr_think(info);
+ info.vr_think(info, self);
vehicles_painframe(self);
vehicles_reset_colors();
Vehicle info = Vehicles_from(self.vehicleid);
- info.vr_spawn(info);
+ info.vr_spawn(info, self);
CSQCMODEL_AUTOINIT(self);
}
self.tur_head.team = self.team;
Vehicle info = Vehicles_from(veh.vehicleid);
- info.vr_setup(info);
+ info.vr_setup(info, veh);
if(self.active == ACTIVE_NOT)
self.nextthink = 0; // wait until activated
ATTRIB(Vehicle, height, float, 0)
/** (BOTH) setup vehicle data */
- METHOD(Vehicle, vr_setup, void(Vehicle)) { }
+ METHOD(Vehicle, vr_setup, void(Vehicle this, entity instance)) { }
/** (SERVER) logic to run every frame */
- METHOD(Vehicle, vr_think, void(Vehicle)) { }
+ METHOD(Vehicle, vr_think, void(Vehicle this, entity instance)) { }
/** (SERVER) called when vehicle dies */
- METHOD(Vehicle, vr_death, void(Vehicle)) { }
+ METHOD(Vehicle, vr_death, void(Vehicle this, entity instance)) { }
/** (BOTH) precaches models/sounds used by this vehicle */
- METHOD(Vehicle, vr_precache, void(Vehicle)) { }
+ METHOD(Vehicle, vr_precache, void(Vehicle this)) { }
/** (SERVER) called when a player enters this vehicle */
- METHOD(Vehicle, vr_enter, void(Vehicle)) { }
+ METHOD(Vehicle, vr_enter, void(Vehicle this, entity instance)) { }
/** (SERVER) called when the vehicle re-spawns */
- METHOD(Vehicle, vr_spawn, void(Vehicle)) { }
+ METHOD(Vehicle, vr_spawn, void(Vehicle this, entity instance)) { }
/** (SERVER) called when a vehicle hits something */
- METHOD(Vehicle, vr_impact, void(Vehicle)) { }
+ METHOD(Vehicle, vr_impact, void(Vehicle this, entity instance)) { }
/** (CLIENT) logic to run every frame */
- METHOD(Vehicle, vr_hud, void(Vehicle)) { }
+ METHOD(Vehicle, vr_hud, void(Vehicle this)) { }
/** (CLIENT) logic to run every frame */
- METHOD(Vehicle, vr_crosshair, void(Vehicle)) { }
+ METHOD(Vehicle, vr_crosshair, void(Vehicle this)) { }
ENDCLASS(Vehicle)
// vehicle spawn flags (need them here for common registrations)
if(!vehicle_initialize(VEH_BUMBLEBEE, false)) { remove(self); return; }
}
- METHOD(Bumblebee, vr_impact, void(Bumblebee thisveh))
+ METHOD(Bumblebee, vr_impact, void(Bumblebee thisveh, entity instance))
{
if(autocvar_g_vehicle_bumblebee_bouncepain)
vehicles_impact(autocvar_g_vehicle_bumblebee_bouncepain_x, autocvar_g_vehicle_bumblebee_bouncepain_y, autocvar_g_vehicle_bumblebee_bouncepain_z);
}
- METHOD(Bumblebee, vr_enter, void(Bumblebee thisveh))
+ METHOD(Bumblebee, vr_enter, void(Bumblebee thisveh, entity instance))
{
SELFPARAM();
self.touch = bumblebee_touch;
self.nextthink = 0;
self.movetype = MOVETYPE_BOUNCEMISSILE;
}
- METHOD(Bumblebee, vr_think, void(Bumblebee thisveh))
+ METHOD(Bumblebee, vr_think, void(Bumblebee thisveh, entity instance))
{
SELFPARAM();
self.angles_z *= 0.8;
}
}
}
- METHOD(Bumblebee, vr_death, void(Bumblebee thisveh))
+ METHOD(Bumblebee, vr_death, void(Bumblebee thisveh, entity instance))
{
SELFPARAM();
entity oldself = self;
setorigin(self, self.pos1);
}
- METHOD(Bumblebee, vr_spawn, void(Bumblebee thisveh))
+ METHOD(Bumblebee, vr_spawn, void(Bumblebee thisveh, entity instance))
{
SELFPARAM();
if(!self.gun1)
setorigin(self, self.origin + '0 0 25');
}
- METHOD(Bumblebee, vr_setup, void(Bumblebee thisveh))
+ METHOD(Bumblebee, vr_setup, void(Bumblebee thisveh, entity instance))
{
SELFPARAM();
if(autocvar_g_vehicle_bumblebee_energy)
{
Vehicles_drawCrosshair(vCROSS_HEAL);
}
- METHOD(Bumblebee, vr_setup, void(Bumblebee thisveh))
+ METHOD(Bumblebee, vr_setup, void(Bumblebee thisveh, entity instance))
{
AuxiliaryXhair[0].axh_image = vCROSS_LOCK; // Raygun-locked
AuxiliaryXhair[1].axh_image = vCROSS_BURST; // Gunner1
#endif
#endif
- METHOD(Racer, vr_impact, void(Racer thisveh))
+ METHOD(Racer, vr_impact, void(Racer thisveh, entity instance))
{
#ifdef SVQC
if(autocvar_g_vehicle_racer_bouncepain)
#endif
}
- METHOD(Racer, vr_enter, void(Racer thisveh))
+ METHOD(Racer, vr_enter, void(Racer thisveh, entity instance))
{
#ifdef SVQC
self.movetype = MOVETYPE_BOUNCE;
#endif
}
- METHOD(Racer, vr_spawn, void(Racer thisveh))
+ METHOD(Racer, vr_spawn, void(Racer thisveh, entity instance))
{
#ifdef SVQC
if(self.scale != 0.5)
#endif
}
- METHOD(Racer, vr_death, void(Racer thisveh))
+ METHOD(Racer, vr_death, void(Racer thisveh, entity instance))
{
#ifdef SVQC
self.SendEntity = func_null; // stop networking this racer (for now)
Vehicles_drawCrosshair(vCROSS_GUIDE);
}
#endif
- METHOD(Racer, vr_setup, void(Racer thisveh))
+ METHOD(Racer, vr_setup, void(Racer thisveh, entity instance))
{
#ifdef SVQC
self.vehicle_exit = racer_exit;
if(!vehicle_initialize(VEH_RAPTOR, false)) { remove(self); return; }
}
- METHOD(Raptor, vr_impact, void(Raptor thisveh))
+ METHOD(Raptor, vr_impact, void(Raptor thisveh, entity instance))
{
if(autocvar_g_vehicle_raptor_bouncepain)
vehicles_impact(autocvar_g_vehicle_raptor_bouncepain_x, autocvar_g_vehicle_raptor_bouncepain_y, autocvar_g_vehicle_raptor_bouncepain_z);
}
- METHOD(Raptor, vr_enter, void(Raptor thisveh))
+ METHOD(Raptor, vr_enter, void(Raptor thisveh, entity instance))
{
self.vehicle_weapon2mode = RSM_BOMB;
self.owner.PlayerPhysplug = raptor_takeoff;
CSQCVehicleSetup(self.owner, 0);
}
- METHOD(Raptor, vr_death, void(Raptor thisveh))
+ METHOD(Raptor, vr_death, void(Raptor thisveh, entity instance))
{
self.health = 0;
self.event_damage = func_null;
self.colormod = '-0.5 -0.5 -0.5';
self.touch = raptor_blowup;
}
- METHOD(Raptor, vr_spawn, void(Raptor thisveh))
+ METHOD(Raptor, vr_spawn, void(Raptor thisveh, entity instance))
{
if(!self.gun1)
{
self.vehicle_health = autocvar_g_vehicle_raptor_health;
self.vehicle_shield = autocvar_g_vehicle_raptor_shield;
}
- METHOD(Raptor, vr_setup, void(Raptor thisveh))
+ METHOD(Raptor, vr_setup, void(Raptor thisveh, entity instance))
{
if(autocvar_g_vehicle_raptor_shield)
self.vehicle_flags |= VHF_HASSHIELD;
Vehicles_drawCrosshair(crosshair);
}
- METHOD(Raptor, vr_setup, void(Raptor thisveh))
+ METHOD(Raptor, vr_setup, void(Raptor thisveh, entity instance))
{
AuxiliaryXhair[1].axh_image = vCROSS_LOCK;
}
if(!vehicle_initialize(VEH_SPIDERBOT, false)) { remove(self); return; }
}
- METHOD(Spiderbot, vr_impact, void(Spiderbot thisveh))
+ METHOD(Spiderbot, vr_impact, void(Spiderbot thisveh, entity instance))
{
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))
+ METHOD(Spiderbot, vr_enter, void(Spiderbot thisveh, entity instance))
{
self.vehicle_weapon2mode = SBRM_GUIDE;
self.movetype = MOVETYPE_WALK;
setorigin(self.owner.flagcarried, '-20 0 120');
}
}
- METHOD(Spiderbot, vr_think, void(Spiderbot thisveh))
+ METHOD(Spiderbot, vr_think, void(Spiderbot thisveh, entity instance))
{
if(IS_ONGROUND(self))
movelib_brake_simple(autocvar_g_vehicle_spiderbot_speed_stop);
}
- METHOD(Spiderbot, vr_death, void(Spiderbot thisveh))
+ METHOD(Spiderbot, vr_death, void(Spiderbot thisveh, entity instance))
{
self.health = 0;
self.event_damage = func_null;
CSQCModel_UnlinkEntity(self); // networking the death scene would be a nightmare
}
- METHOD(Spiderbot, vr_spawn, void(Spiderbot thisveh))
+ METHOD(Spiderbot, vr_spawn, void(Spiderbot thisveh, entity instance))
{
if(!self.gun1)
{
self.PlayerPhysplug = spiderbot_frame;
}
- METHOD(Spiderbot, vr_setup, void(Spiderbot thisveh))
+ METHOD(Spiderbot, vr_setup, void(Spiderbot thisveh, entity instance))
{
if(autocvar_g_vehicle_spiderbot_shield)
self.vehicle_flags |= VHF_HASSHIELD;
Vehicles_drawCrosshair(crosshair);
}
- METHOD(Spiderbot, vr_setup, void(Spiderbot thisveh))
+ METHOD(Spiderbot, vr_setup, void(Spiderbot thisveh, entity instance))
{
AuxiliaryXhair[0].axh_image = vCROSS_HINT; // Minigun1
AuxiliaryXhair[1].axh_image = vCROSS_HINT; // Minigun2