#include "csqcmodel_hooks.qh"
- #include "autocvars.qh"
- #include "miscfunctions.qh"
+
+ #include <client/autocvars.qh>
#include <client/mutators/_mod.qh>
- #include "player_skeleton.qh"
- #include "weapons/projectile.qh"
+ #include <client/player_skeleton.qh>
+ #include <client/weapons/projectile.qh>
#include <common/animdecide.qh>
+ #include <common/effects/all.inc>
+ #include <common/effects/all.qh>
#include <common/ent_cs.qh>
+ #include <common/gamemodes/_mod.qh>
+ #include <common/mapinfo.qh>
#include <common/physics/movetypes/movetypes.qh>
+ #include <common/physics/player.qh>
#include <common/viewloc.qh>
- #include <common/effects/all.qh>
- #include <common/effects/all.inc>
#include <lib/csqcmodel/cl_model.qh>
#include <lib/csqcmodel/cl_player.qh>
#include <lib/csqcmodel/interpolate.qh>
}
void CSQCPlayer_ModelAppearance_Apply(entity this, bool islocalplayer)
{
+ int cm = this.forceplayermodels_savecolormap;
+ cm = (cm >= 1024) ? cm : (entcs_GetClientColors(cm - 1) + 1024);
+
if(MUTATOR_CALLHOOK(ForcePlayermodels_Skip, this, islocalplayer))
goto skipforcemodels;
// apply it
bool isfriend;
- int cm;
- cm = this.forceplayermodels_savecolormap;
- cm = (cm >= 1024) ? cm : (entcs_GetClientColors(cm - 1) + 1024);
if(teamplay)
isfriend = (cm == 1024 + 17 * myteam);
this.skin = this.forceplayermodels_saveskin;
}
+ LABEL(skipforcemodels)
+
+ if(MUTATOR_CALLHOOK(ForcePlayercolors_Skip, this, islocalplayer))
+ goto skipforcecolors;
+
// forceplayercolors too
if(teamplay)
{
if(autocvar_cl_forcemyplayercolors)
forcecolor_friend = 1024 + autocvar_cl_forcemyplayercolors;
- if(autocvar_cl_forceplayercolors == 2 && team_count == 2)
+ if((autocvar_cl_forceplayercolors == 2 && team_count == 2)
+ || (autocvar_cl_forceplayercolors == 3 && IS_GAMETYPE(DUEL)))
forcecolor_enemy = 1024 + autocvar__cl_color;
if(forcecolor_enemy && !forcecolor_friend)
this.colormap = player_localnum + 1;
}
- LABEL(skipforcemodels)
+ LABEL(skipforcecolors)
if((this.csqcmodel_effects & CSQCMODEL_EF_RESPAWNGHOST) && !autocvar_cl_respawn_ghosts_keepcolors)
{
// GLOWMOD AND DEATH FADING
if(this.colormap > 0)
- this.glowmod = colormapPaletteColor(((this.colormap >= 1024) ? this.colormap : entcs_GetClientColors(this.colormap - 1)) & 0x0F, true) * 2;
+ this.glowmod = colormapPaletteColor(((this.colormap >= 1024) ? this.colormap : entcs_GetClientColors(this.colormap - 1)) & 0x0F, true);
else
this.glowmod = '1 1 1';
}
// recursive predraw call to fix issues with forcemodels and LOD if bone indexes mismatch
- if(this.tag_entity.classname == "csqcmodel")
+ if(this.tag_entity.classname == "ENT_CLIENT_MODEL")
{
CSQCModel_Hook_PreDraw(this.tag_entity, (this.tag_entity.isplayermodel & ISPLAYER_CLIENT));
}
if(eff & EF_FULLBRIGHT)
this.renderflags |= RF_FULLBRIGHT;
if(eff & EF_FLAME)
- pointparticles(EFFECT_EF_FLAME, this.origin, '0 0 0', bound(0, frametime, 0.1));
+ {
+ boxparticles(particleeffectnum(EFFECT_EF_FLAME), this, this.absmin, this.absmax, this.velocity, this.velocity, bound(0, frametime, 0.1), 0);
+ //pointparticles(EFFECT_EF_FLAME, this.origin, '0 0 0', bound(0, frametime, 0.1));
+ }
if(eff & EF_STARDUST)
- pointparticles(EFFECT_EF_STARDUST, this.origin, '0 0 0', bound(0, frametime, 0.1));
+ {
+ boxparticles(particleeffectnum(EFFECT_EF_STARDUST), this, this.absmin, this.absmax, this.velocity, this.velocity, bound(0, frametime, 0.1), 0);
+ //pointparticles(EFFECT_EF_STARDUST, this.origin, '0 0 0', bound(0, frametime, 0.1));
+ }
if(eff & EF_NOSHADOW)
this.renderflags |= RF_NOSHADOW;
if(eff & EF_NODEPTHTEST)
#include "projectile.qh"
- #include "../autocvars.qh"
- #include "../defs.qh"
- #include "../main.qh"
+ #include <client/autocvars.qh>
#include <client/mutators/_mod.qh>
-
#include <common/constants.qh>
- #include <common/effects/effect.qh>
#include <common/effects/all.qh>
+ #include <common/effects/effect.qh>
+ #include <common/mutators/mutator/nades/nades.qh>
#include <common/net_linked.qh>
#include <common/physics/movetypes/movetypes.qh>
-
- #include <common/mutators/mutator/nades/nades.qh>
-
#include <lib/csqcmodel/interpolate.qh>
-
#include <lib/warpzone/anglestransform.qh>
.float alpha;
// TODO: projectiles use glowmaps for their color, not teams
#if 0
if(this.colormap > 0)
- this.glowmod = colormapPaletteColor(this.colormap & 0x0F, true) * 2;
+ this.glowmod = colormapPaletteColor(this.colormap & 0x0F, true);
else
this.glowmod = '1 1 1';
#endif
if (!(this.count & 0x80))
InterpolateOrigin_Note(this);
- this.classname = "csqcprojectile";
this.draw = Projectile_Draw;
if (isnew) IL_PUSH(g_drawables, this);
this.entremove = Ent_RemoveProjectile;
#include "cl_turrets.qh"
+
void turret_remove(entity this)
{
delete(this.tur_head);
.vector glowmod;
void turret_changeteam(entity this)
{
- this.glowmod = Team_ColorRGB(this.team - 1) * 2;
+ this.glowmod = Team_ColorRGB(this.team - 1);
this.teamradar_color = Team_ColorRGB(this.team - 1);
if(this.team)
this.origin = ReadVector();
setorigin(this, this.origin);
- this.angles_x = ReadAngle();
- this.angles_y = ReadAngle();
+ this.angles = ReadAngleVector2D();
turret_construct(this, isnew);
this.colormap = 1024;
#include "calculations.qh"
#include "projectiles.qh"
#include <common/models/all.qh>
+ #include <common/effects/all.qh>
#endif
#include <common/util.qh>
default:
case CMD_REQUEST_USAGE:
{
- 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.");
+ LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " dumpweapons [filename]");
+ LOG_HELP(" Where 'filename' is the file to write (default is weapons_dump.cfg),");
+ LOG_HELP(" if supplied with '-' output to console as well as default,");
+ LOG_HELP(" if left blank, it will only write to default.");
return;
}
}
// read cvars from weapon settings
+ // cvars are created as such: g_balance_wepname_name
#define WEP_CVAR(wepname, name) (_wep_##wepname.wepvar_##name)
#define WEP_CVAR_PRI(wepname, name) WEP_CVAR(wepname, primary_##name)
#define WEP_CVAR_SEC(wepname, name) WEP_CVAR(wepname, secondary_##name)
else
inaccessible = strcat(inaccessible, "\n", it.netname);
});
- if (inaccessible) LOG_TRACEF("Impulse limit exceeded, weapon(s) will not be directly accessible: %s", inaccessible);
+ if (inaccessible && autocvar_developer > 0) LOG_TRACEF("Impulse limit exceeded, weapon(s) will not be directly accessible: %s", inaccessible);
#ifdef CSQC
FOREACH(Weapons, true, it.wr_init(it));
#endif
vector weaponentity_glowmod(Weapon wep, entity actor, int c, entity wepent)
{
vector g;
- if (!(g = wep.wr_glow(wep, actor, wepent))) g = colormapPaletteColor(c & 0x0F, true) * 2;
+ if (!(g = wep.wr_glow(wep, actor, wepent))) g = colormapPaletteColor(c & 0x0F, true);
return g;
}
.vector spawnorigin; // for casings
+ .vector movedir_aligned; // shot origin based on weapon alignment (unaffected by shootfromeye)
+
// weapon animation vectors:
.vector anim_fire1;
.vector anim_fire2;
.vector anim_idle;
.vector anim_reload;
+ .entity muzzle_flash;
+
// static frame globals
ENUMCLASS(WFRAME)
#ifdef SVQC
void wframe_send(entity actor, entity weaponentity, int wepframe, float attackrate, bool restartanim);
#endif
+
+ #ifdef SVQC
+ void W_MuzzleFlash(Weapon thiswep, entity actor, .entity weaponentity, vector shotorg, vector shotdir);
+ #endif
#endif