X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fvehicles%2Fvehicle.qh;h=45cdacf39828b9d97b63ab6c7115adddc36db201;hb=edf01df130d0d1877461561178b8833a9ab6051c;hp=80787b4ae619eb8acda9abb09e101c698be384d3;hpb=4d44a08eb72dbb0487a31612474ce477d3d805c4;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/vehicles/vehicle.qh b/qcsrc/common/vehicles/vehicle.qh index 80787b4ae..45cdacf39 100644 --- a/qcsrc/common/vehicles/vehicle.qh +++ b/qcsrc/common/vehicles/vehicle.qh @@ -24,30 +24,36 @@ CLASS(Vehicle, Object) /** cockpit model tag */ ATTRIB(Vehicle, tag_view, string, string_null) /** player physics mod */ - ATTRIB(Vehicle, PlayerPhysplug, int(), func_null) + ATTRIB(Vehicle, PlayerPhysplug, bool(entity), func_null) /** */ ATTRIB(Vehicle, spawnflags, int, 0) /** vehicle hitbox size */ ATTRIB(Vehicle, mins, vector, '-0 -0 -0') /** vehicle hitbox size */ ATTRIB(Vehicle, maxs, vector, '0 0 0') + /** vehicle 3rd person view offset */ + ATTRIB(Vehicle, view_ofs, vector, '0 0 0') + /** vehicle 3rd person view distance */ + 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 thisveh, entity player)) { } ENDCLASS(Vehicle) // vehicle spawn flags (need them here for common registrations)