From 2d3ab02a8b9056a7361db1537cd49cab5fe18307 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 2 Jan 2016 18:45:03 +1000 Subject: [PATCH] Kill get_vehicleinfo --- qcsrc/client/hud/hud.qc | 2 +- qcsrc/client/view.qc | 4 ++-- qcsrc/common/vehicles/all.qh | 1 - qcsrc/common/vehicles/cl_vehicles.qc | 2 +- qcsrc/common/vehicles/sv_vehicles.qc | 14 +++++++------- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/qcsrc/client/hud/hud.qc b/qcsrc/client/hud/hud.qc index 7b1aed124..b0f2b9ea6 100644 --- a/qcsrc/client/hud/hud.qc +++ b/qcsrc/client/hud/hud.qc @@ -418,7 +418,7 @@ void HUD_Vehicle() if(hud == HUD_BUMBLEBEE_GUN) CSQC_BUMBLE_GUN_HUD(); else { - Vehicle info = get_vehicleinfo(hud); + Vehicle info = Vehicles_from(hud); info.vr_hud(info); } } diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 80b1770c3..0995bc2f7 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -779,7 +779,7 @@ void HUD_Crosshair_Vehicle() { if(hud != HUD_BUMBLEBEE_GUN) { - Vehicle info = get_vehicleinfo(hud); + Vehicle info = Vehicles_from(hud); info.vr_crosshair(info); } } @@ -1466,7 +1466,7 @@ void CSQC_UpdateView(float w, float h) { if(hud != HUD_BUMBLEBEE_GUN) { - Vehicle info = get_vehicleinfo(hud); + Vehicle info = Vehicles_from(hud); vehicle_viewdist = info.height; vehicle_viewofs = info.view_ofs; } diff --git a/qcsrc/common/vehicles/all.qh b/qcsrc/common/vehicles/all.qh index cf4b711c3..f4e837f78 100644 --- a/qcsrc/common/vehicles/all.qh +++ b/qcsrc/common/vehicles/all.qh @@ -5,7 +5,6 @@ REGISTRY(Vehicles, BITS(4)) #define Vehicles_from(i) _Vehicles_from(i, VEH_Null) -#define get_vehicleinfo(i) Vehicles_from(i) REGISTER_REGISTRY(Vehicles) REGISTRY_CHECK(Vehicles) diff --git a/qcsrc/common/vehicles/cl_vehicles.qc b/qcsrc/common/vehicles/cl_vehicles.qc index cc4fa0f12..6b900fea6 100644 --- a/qcsrc/common/vehicles/cl_vehicles.qc +++ b/qcsrc/common/vehicles/cl_vehicles.qc @@ -109,7 +109,7 @@ NET_HANDLE(TE_CSQC_VEHICLESETUP, bool isnew) AuxiliaryXhair[0].axh_image = vCROSS_BURST; // Plasma cannons AuxiliaryXhair[1].axh_image = vCROSS_BURST; // Raygun } else { - Vehicle info = get_vehicleinfo(hud_id); + Vehicle info = Vehicles_from(hud_id); info.vr_setup(info); } } diff --git a/qcsrc/common/vehicles/sv_vehicles.qc b/qcsrc/common/vehicles/sv_vehicles.qc index 53ed9bf4c..78a0dbc1f 100644 --- a/qcsrc/common/vehicles/sv_vehicles.qc +++ b/qcsrc/common/vehicles/sv_vehicles.qc @@ -737,7 +737,7 @@ void vehicles_damage(entity inflictor, entity attacker, float damage, int deatht antilag_clear(self); - Vehicle info = get_vehicleinfo(self.vehicleid); + Vehicle info = Vehicles_from(self.vehicleid); info.vr_death(info); vehicles_setreturn(self); } @@ -944,7 +944,7 @@ void vehicles_touch() } if(self.play_time < time) { - Vehicle info = get_vehicleinfo(self.vehicleid); + Vehicle info = Vehicles_from(self.vehicleid); info.vr_impact(info); } @@ -1118,7 +1118,7 @@ void vehicles_enter(entity pl, entity veh) setself(veh); CSQCModel_UnlinkEntity(veh); - Vehicle info = get_vehicleinfo(veh.vehicleid); + Vehicle info = Vehicles_from(veh.vehicleid); info.vr_enter(info); setself(this); @@ -1132,7 +1132,7 @@ void vehicles_think() if(self.owner) self.owner.vehicle_weapon2mode = self.vehicle_weapon2mode; - Vehicle info = get_vehicleinfo(self.vehicleid); + Vehicle info = Vehicles_from(self.vehicleid); info.vr_think(info); vehicles_painframe(self); @@ -1183,7 +1183,7 @@ void vehicles_spawn() vehicles_reset_colors(); - Vehicle info = get_vehicleinfo(self.vehicleid); + Vehicle info = Vehicles_from(self.vehicleid); info.vr_spawn(info); CSQCMODEL_AUTOINIT(self); @@ -1198,7 +1198,7 @@ bool vehicle_initialize(entity veh, bool nodrop) return false; if(!veh.tur_head) { - Vehicle info = get_vehicleinfo(veh.vehicleid); + Vehicle info = Vehicles_from(veh.vehicleid); info.vr_precache(info); } @@ -1293,7 +1293,7 @@ bool vehicle_initialize(entity veh, bool nodrop) self.pos2 = self.angles; self.tur_head.team = self.team; - Vehicle info = get_vehicleinfo(veh.vehicleid); + Vehicle info = Vehicles_from(veh.vehicleid); info.vr_setup(info); if(self.active == ACTIVE_NOT) -- 2.39.2