X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Fcommon%2Fweapons%2Fall.qh;h=0af47590078a8dde4c44257de429ff240e0dd19e;hb=d01c567581179df7cc68bcdc8dce58efad911bc4;hp=9570e8c561aaac732a39ba63ae1a5d51fdbf68e9;hpb=8c965aa90470cfa8cbfaff88db71b6b5899a90ce;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/all.qh b/qcsrc/common/weapons/all.qh index 9570e8c56..0af475900 100644 --- a/qcsrc/common/weapons/all.qh +++ b/qcsrc/common/weapons/all.qh @@ -4,8 +4,8 @@ #include #include "config.qh" -// weapon sets -USING(WepSet, vector); +#include "weapon.qh" + #ifdef SVQC void WriteWepSet(float dest, WepSet w); #endif @@ -16,10 +16,9 @@ WepSet WepSet_GetFromStat_InMap(); WepSet ReadWepSet(); #endif -#include "weapon.qh" - #ifdef GAMEQC #include "calculations.qh" +#include "projectiles.qh" #include #endif @@ -65,17 +64,17 @@ GENERIC_COMMAND(dumpweapons, "Dump all weapons into weapons_dump.txt") // WEAPON if(wep_config_file >= 0) { Dump_Weapon_Settings(); - LOG_INFO(sprintf("Dumping weapons... File located in ^2data/data/%s^7.\n", filename)); + LOG_INFOF("Dumping weapons... File located in ^2data/data/%s^7.", filename); fclose(wep_config_file); wep_config_file = -1; wep_config_alsoprint = -1; } else { - LOG_INFO(sprintf("^1Error: ^7Could not open file '%s'!\n", filename)); + LOG_INFOF("^1Error: ^7Could not open file '%s'!", filename); } #else - LOG_INFO(_("Weapons dump command only works with sv_cmd.\n")); + LOG_INFO(_("Weapons dump command only works with sv_cmd.")); #endif return; } @@ -83,10 +82,10 @@ GENERIC_COMMAND(dumpweapons, "Dump all weapons into weapons_dump.txt") // WEAPON default: case CMD_REQUEST_USAGE: { - LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " dumpweapons [filename]")); - LOG_INFO(" Where 'filename' is the file to write (default is weapons_dump.cfg),\n"); - LOG_INFO(" if supplied with '-' output to console as well as default,\n"); - LOG_INFO(" if left blank, it will only write to default.\n"); + LOG_INFO("Usage:^3 ", GetProgramCommandPrefix(), " dumpweapons [filename]"); + LOG_INFO(" Where 'filename' is the file to write (default is weapons_dump.cfg),"); + LOG_INFO(" if supplied with '-' output to console as well as default,"); + LOG_INFO(" if left blank, it will only write to default."); return; } } @@ -143,10 +142,12 @@ X(weaponreplace, string) X(weaponstartoverride, float) X(weaponstart, float) X(weaponthrowable, float) +#ifdef SVQC X(reload_ammo, float) .float reloading_ammo = reload_ammo; X(reload_time, float) .float reloading_time = reload_time; +#endif #undef X @@ -326,13 +327,15 @@ STATIC_INIT(register_weapons_done) .entity weaponchild; .entity exteriorweaponentity; -vector weaponentity_glowmod(Weapon wep, entity actor, int c) +vector weaponentity_glowmod(Weapon wep, entity actor, int c, entity wepent) { vector g; - if (!(g = wep.wr_glow(wep, actor))) g = colormapPaletteColor(c & 0x0F, true) * 2; + if (!(g = wep.wr_glow(wep, actor, wepent))) g = colormapPaletteColor(c & 0x0F, true) * 2; return g; } +.int m_gunalign; + //.int weapon; // current weapon .string weaponname; // name of .weapon @@ -356,6 +359,13 @@ ENUMCLASS_END(WFRAME) .WFRAME wframe; +#ifdef SVQC + #define G_SHOOTFROMFIXEDORIGIN autocvar_g_shootfromfixedorigin +#elif defined(CSQC) + string autocvar_cl_shootfromfixedorigin; + #define G_SHOOTFROMFIXEDORIGIN autocvar_cl_shootfromfixedorigin +#endif + vector shotorg_adjust_values(vector vecs, bool y_is_right, bool visual, int algn); void CL_WeaponEntity_SetModel(entity this, string name, bool _anim); #endif