X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fall.qh;h=26cf121fe8a4f895bd99cdce1c5b905f07134f54;hp=32b03a16be3605d5776bd9d630312cbbb2fac79b;hb=eb877d9a99429c3ffc846377fac46fb750af8620;hpb=bf094df0de66898cb15780dbf136bf93b0761857 diff --git a/qcsrc/common/weapons/all.qh b/qcsrc/common/weapons/all.qh index 32b03a16b..26cf121fe 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,14 +64,14 @@ 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.\n", 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'!\n", filename); } #else LOG_INFO(_("Weapons dump command only works with sv_cmd.\n")); @@ -83,7 +82,7 @@ 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("Usage:^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"); @@ -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, int c) +vector weaponentity_glowmod(Weapon wep, entity actor, int c, entity wepent) { vector g; - if (!(g = wep.wr_glow(wep))) 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