X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fweapons%2Fweaponsystem.qh;h=2fb0f9956833236250c0266fc70b91a2b412d21a;hb=64f2b309aa5be8aafb9ad2137174bb6d99aeb876;hp=97e6c72b4be3698caee7cfca657bf4fd4858c4f2;hpb=317ec3eb27ada1c4668876e9499136125acb7984;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/weapons/weaponsystem.qh b/qcsrc/server/weapons/weaponsystem.qh index 97e6c72b4..2fb0f9956 100644 --- a/qcsrc/server/weapons/weaponsystem.qh +++ b/qcsrc/server/weapons/weaponsystem.qh @@ -1,42 +1,30 @@ -#ifndef WEAPONSYSTEM_H -#define WEAPONSYSTEM_H - -.float wframe; +#pragma once float internalteam; float weaponswapping; entity weapon_dropevent_item; -// VorteX: static frame globals -const float WFRAME_DONTCHANGE = -1; -const float WFRAME_FIRE1 = 0; -const float WFRAME_FIRE2 = 1; -const float WFRAME_IDLE = 2; -const float WFRAME_RELOAD = 3; - -vector shotorg_adjust(vector vecs, bool y_is_right, bool visual, int algn); - -vector shotorg_adjust_values(vector vecs, bool y_is_right, bool visual, int algn); +..entity weaponentity_fld; void CL_SpawnWeaponentity(entity e, .entity weaponentity); vector CL_Weapon_GetShotOrg(float wpn); -float forbidWeaponUse(entity player); +bool forbidWeaponUse(entity player); -void W_AttachToShotorg(entity actor, entity flash, vector offset); +void W_AttachToShotorg(entity actor, .entity weaponentity, entity flash, vector offset); -void W_DecreaseAmmo(Weapon wep, entity actor, float ammo_use); +void W_DecreaseAmmo(Weapon wep, entity actor, float ammo_use, .entity weaponentity); -void W_DropEvent(.void(Weapon) event, entity player, float weapon_type, entity weapon_item); +void W_DropEvent(.void(Weapon, entity actor, .entity) event, entity player, float weapon_type, entity weapon_item, .entity weaponentity); -void W_Reload(entity actor, float sent_ammo_min, string sent_sound); +void W_Reload(entity actor, .entity weaponentity, float sent_ammo_min, Sound sent_sound); -void W_WeaponFrame(entity actor); +void W_WeaponFrame(Player actor, .entity weaponentity); -float W_WeaponRateFactor(); +float W_WeaponRateFactor(entity this); -float W_WeaponSpeedFactor(); +float W_WeaponSpeedFactor(entity this); bool weapon_prepareattack(Weapon thiswep, entity actor, .entity weaponentity, bool secondary, float attacktime); @@ -44,6 +32,4 @@ bool weapon_prepareattack_check(Weapon thiswep, entity actor, .entity weaponenti void weapon_prepareattack_do(entity actor, .entity weaponentity, float secondary, float attacktime); -void weapon_thinkf(entity actor, .entity weaponentity, float fr, float t, void(Weapon thiswep, entity actor, .entity weaponentity, int fire) func); - -#endif +void weapon_thinkf(entity actor, .entity weaponentity, WFRAME fr, float t, void(Weapon thiswep, entity actor, .entity weaponentity, int fire) func);