X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fweapons%2Fweaponsystem.qh;h=2fb0f9956833236250c0266fc70b91a2b412d21a;hb=64f2b309aa5be8aafb9ad2137174bb6d99aeb876;hp=c5ee7abb6daf52e8220e5968c553d5e300d0c259;hpb=349aeb508e5a3d577df60bef8a552da2db7d928d;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/weapons/weaponsystem.qh b/qcsrc/server/weapons/weaponsystem.qh index c5ee7abb6..2fb0f9956 100644 --- a/qcsrc/server/weapons/weaponsystem.qh +++ b/qcsrc/server/weapons/weaponsystem.qh @@ -1,49 +1,35 @@ -#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); +..entity weaponentity_fld; -vector shotorg_adjust_values(vector vecs, bool y_is_right, bool visual, int algn); - -void CL_SpawnWeaponentity(entity e, int slot); +void CL_SpawnWeaponentity(entity e, .entity weaponentity); vector CL_Weapon_GetShotOrg(float wpn); -float forbidWeaponUse(entity player); - -void W_AttachToShotorg(entity actor, entity flash, vector offset); +bool forbidWeaponUse(entity player); -void W_DecreaseAmmo(Weapon wep, entity actor, float ammo_use); +void W_AttachToShotorg(entity actor, .entity weaponentity, entity flash, vector offset); -void W_DropEvent(.void(Weapon) event, entity player, float weapon_type, entity weapon_item); +void W_DecreaseAmmo(Weapon wep, entity actor, float ammo_use, .entity weaponentity); -void W_Reload(entity actor, float sent_ammo_min, string sent_sound); +void W_DropEvent(.void(Weapon, entity actor, .entity) event, entity player, float weapon_type, entity weapon_item, .entity weaponentity); -void W_WeaponFrame(entity actor); +void W_Reload(entity actor, .entity weaponentity, float sent_ammo_min, Sound sent_sound); -float W_WeaponRateFactor(); +void W_WeaponFrame(Player actor, .entity weaponentity); -float W_WeaponSpeedFactor(); +float W_WeaponRateFactor(entity this); -bool weapon_prepareattack(Weapon thiswep, entity actor, int slot, bool secondary, float attacktime); +float W_WeaponSpeedFactor(entity this); -bool weapon_prepareattack_check(Weapon thiswep, entity actor, int slot, float secondary, float attacktime); +bool weapon_prepareattack(Weapon thiswep, entity actor, .entity weaponentity, bool secondary, float attacktime); -void weapon_prepareattack_do(entity actor, int slot, float secondary, float attacktime); +bool weapon_prepareattack_check(Weapon thiswep, entity actor, .entity weaponentity, float secondary, float attacktime); -void weapon_thinkf(entity actor, int slot, float fr, float t, void(Weapon thiswep, entity actor, int slot, int fire) func); +void weapon_prepareattack_do(entity actor, .entity weaponentity, float secondary, float attacktime); -#endif +void weapon_thinkf(entity actor, .entity weaponentity, WFRAME fr, float t, void(Weapon thiswep, entity actor, .entity weaponentity, int fire) func);