X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fweapons%2Fweaponsystem.qh;h=4ddf5a5159eac5adf534d6c61cafd0dc8a933445;hb=e57fd111a3279a4aa4789e2c72f9c819a56c7be9;hp=c5ee7abb6daf52e8220e5968c553d5e300d0c259;hpb=733758fd5a2cdbb707b19bd9766524855f457656;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/weapons/weaponsystem.qh b/qcsrc/server/weapons/weaponsystem.qh index c5ee7abb6..4ddf5a515 100644 --- a/qcsrc/server/weapons/weaponsystem.qh +++ b/qcsrc/server/weapons/weaponsystem.qh @@ -1,49 +1,38 @@ -#ifndef WEAPONSYSTEM_H -#define WEAPONSYSTEM_H +#pragma once -.float wframe; +#include +#include 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; +..entity weaponentity_fld; -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); - -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);