diff --git a/base/src/shared/weapon_common.qc b/base/src/shared/weapon_common.qc index 9e3e2c99..57ac728c 100644 --- a/base/src/shared/weapon_common.qc +++ b/base/src/shared/weapon_common.qc @@ -122,6 +122,7 @@ Weapons_SetModel(string mdl) #ifdef CLIENT setmodel(pSeat->m_eViewModel, mdl); setsize(pSeat->m_eViewModel, [0,0,0], [0,0,0]); + pSeat->m_eViewModel.effects |= EF_NOSHADOW; #endif } diff --git a/build.cfg b/build.cfg old mode 100755 new mode 100644 index 905637b8..7d4ea0d1 --- a/build.cfg +++ b/build.cfg @@ -26,7 +26,7 @@ BUILD_IQMTOOL=1 BUILD_IMGTOOL=1 # Specify which engine revision to build, these are considered 'stable'; 0 = latest -BUILD_ENGINEREVISION=6063 +BUILD_ENGINEREVISION=6084 # Whether or not to run 'git pull' or 'svn up' before building a component BUILD_UPDATE=1 diff --git a/src/gs-entbase/server/func_breakable.qc b/src/gs-entbase/server/func_breakable.qc index 9cdcc63c..20caf1f5 100644 --- a/src/gs-entbase/server/func_breakable.qc +++ b/src/gs-entbase/server/func_breakable.qc @@ -105,7 +105,6 @@ const string funcbreakable_objtable[] = { class func_breakable:CBaseTrigger { - int m_iMaterial; float m_flDelay; float m_flExplodeMag; float m_flExplodeRad; diff --git a/src/gs-entbase/shared/baseentity.h b/src/gs-entbase/shared/baseentity.h index 2f9d605a..eb8859c7 100644 --- a/src/gs-entbase/shared/baseentity.h +++ b/src/gs-entbase/shared/baseentity.h @@ -70,6 +70,7 @@ class CBaseEntity nonvirtual int(void) IsOnFire; /* Reliable APIs */ + int m_iMaterial; nonvirtual vector(void) GetSpawnOrigin; nonvirtual vector(void) GetSpawnAngles; nonvirtual string(void) GetSpawnModel; diff --git a/src/server/footsteps.h b/src/server/footsteps.h index 6220c1da..de024219 100644 --- a/src/server/footsteps.h +++ b/src/server/footsteps.h @@ -49,6 +49,26 @@ #define MATID_SAND 'N' #endif +/* other notes: + + in The Wastes (2003) 'I' is sand, 'U' is plaster, + 'R' is rust. +*/ + +/* modern additions, not implemented yet */ +#define MATID_CLAY 1 +#define MATID_PLASTER 2 +#define MATID_ROCK 3 +#define MATID_RUBBER 4 +#define MATID_SHEETROCK 5 +#define MATID_CLOTH 6 +#define MATID_CARPET 7 +#define MATID_PAPER 8 +#define MATID_UPHOLSTERY 9 +#define MATID_PUDDLE 10 +#define MATID_MUD 11 +#define MATID_SANDBARREL 12 + void Footsteps_Init(void); void Footsteps_HLBSP(base_player target); void Footsteps_VVBSP(base_player target); diff --git a/src/server/traceattack.qc b/src/server/traceattack.qc index 35ac2532..1fa44341 100644 --- a/src/server/traceattack.qc +++ b/src/server/traceattack.qc @@ -33,6 +33,129 @@ TraceAttack_Apply(entity eAttacker, int iWeapon) g_multiDamage_Value = 0; } +void +TraceAttack_ImpactWorld(void) +{ + string tex_name; + float surf; + + switch (serverkeyfloat("*bspversion")) { + case BSPVER_HL: + surf = getsurfacenearpoint(trace_ent, trace_endpos); + tex_name = Materials_FixName(getsurfacetexture(trace_ent, surf)); + + /* our hashtable is the key to all this */ + switch ((float)hash_get(hashMaterials, tex_name)) { + case MATID_ALIEN: + FX_Impact(IMPACT_ALIEN, trace_endpos, trace_plane_normal); + break; + case MATID_COMPUTER: + FX_Impact(IMPACT_COMPUTER, trace_endpos, trace_plane_normal); + break; + case MATID_CONCRETE: + FX_Impact(IMPACT_CONCRETE, trace_endpos, trace_plane_normal); + break; + case MATID_DIRT: + FX_Impact(IMPACT_DIRT, trace_endpos, trace_plane_normal); + break; + case MATID_BLOODYFLESH: + case MATID_FLESH: + FX_Impact(IMPACT_FLESH, trace_endpos, trace_plane_normal); + break; + case MATID_FOLIAGE: + FX_Impact(IMPACT_FOLIAGE, trace_endpos, trace_plane_normal); + break; + case MATID_GLASS: + FX_Impact(IMPACT_GLASS, trace_endpos, trace_plane_normal); + break; + case MATID_GRATE: + FX_Impact(IMPACT_GRATE, trace_endpos, trace_plane_normal); + break; + case MATID_METAL: + FX_Impact(IMPACT_METAL, trace_endpos, trace_plane_normal); + break; + case MATID_SAND: + FX_Impact(IMPACT_SAND, trace_endpos, trace_plane_normal); + break; + case MATID_SLOSH: + FX_Impact(IMPACT_SLOSH, trace_endpos, trace_plane_normal); + break; + case MATID_SNOW: + FX_Impact(IMPACT_SNOW, trace_endpos, trace_plane_normal); + break; + case MATID_TILE: + FX_Impact(IMPACT_TILE, trace_endpos, trace_plane_normal); + break; + case MATID_VENT: + FX_Impact(IMPACT_VENT, trace_endpos, trace_plane_normal); + break; + case MATID_WOOD: + FX_Impact(IMPACT_WOOD, trace_endpos, trace_plane_normal); + break; + default: + FX_Impact(IMPACT_DEFAULT, trace_endpos, trace_plane_normal); + break; + } + break; + case BSPVER_Q3: /* Q3 */ + case BSPVER_RTCW: /* RtCW */ + case BSPVER_RBSP: /* RFVBSP */ + switch (trace_surfaceflagsi) { + case SURF_ALIEN: + FX_Impact(IMPACT_ALIEN, trace_endpos, trace_plane_normal); + break; + case SURF_COMPUTER: + FX_Impact(IMPACT_COMPUTER, trace_endpos, trace_plane_normal); + break; + case SURF_CONCRETE: + FX_Impact(IMPACT_CONCRETE, trace_endpos, trace_plane_normal); + break; + case SURF_DIRT: + FX_Impact(IMPACT_DIRT, trace_endpos, trace_plane_normal); + break; + case SURF_BLOODYFLESH: + FX_Impact(IMPACT_FLESH, trace_endpos, trace_plane_normal); + break; + case SURF_FOLIAGE: + FX_Impact(IMPACT_FOLIAGE, trace_endpos, trace_plane_normal); + break; + case SURF_GLASS: + FX_Impact(IMPACT_GLASS, trace_endpos, trace_plane_normal); + break; + case SURF_GRATE: + FX_Impact(IMPACT_GRATE, trace_endpos, trace_plane_normal); + break; + case SURF_METAL: + FX_Impact(IMPACT_METAL, trace_endpos, trace_plane_normal); + break; + case SURF_SAND: + FX_Impact(IMPACT_SAND, trace_endpos, trace_plane_normal); + break; + case SURF_SLOSH: + FX_Impact(IMPACT_SLOSH, trace_endpos, trace_plane_normal); + break; + case SURF_SNOW: + FX_Impact(IMPACT_SNOW, trace_endpos, trace_plane_normal); + break; + case SURF_TILE: + FX_Impact(IMPACT_TILE, trace_endpos, trace_plane_normal); + break; + case SURF_VENT: + FX_Impact(IMPACT_VENT, trace_endpos, trace_plane_normal); + break; + case SURF_WOOD: + FX_Impact(IMPACT_WOOD, trace_endpos, trace_plane_normal); + break; + default: + FX_Impact(IMPACT_DEFAULT, trace_endpos, trace_plane_normal); + break; + } + break; + default: + FX_Impact(IMPACT_DEFAULT, trace_endpos, trace_plane_normal); + } +} + /* cast a single bullet shot */ static void TraceAttack_FireSingle(vector vecPos, vector vAngle, int iDamage, int iWeapon) @@ -88,123 +211,42 @@ TraceAttack_FireSingle(vector vecPos, vector vAngle, int iDamage, int iWeapon) /* impact per bullet */ if (trace_ent.iBleeds == 0) { - string tex_name; - float surf; - - switch (serverkeyfloat("*bspversion")) { - case BSPVER_HL: - surf = getsurfacenearpoint(trace_ent, trace_endpos); - tex_name = Materials_FixName(getsurfacetexture(trace_ent, surf)); - - /* our hashtable is the key to all this */ - switch ((float)hash_get(hashMaterials, tex_name)) { - case MATID_ALIEN: - FX_Impact(IMPACT_ALIEN, trace_endpos, trace_plane_normal); - break; - case MATID_COMPUTER: - FX_Impact(IMPACT_COMPUTER, trace_endpos, trace_plane_normal); - break; - case MATID_CONCRETE: - FX_Impact(IMPACT_CONCRETE, trace_endpos, trace_plane_normal); - break; - case MATID_DIRT: - FX_Impact(IMPACT_DIRT, trace_endpos, trace_plane_normal); - break; - case MATID_BLOODYFLESH: - case MATID_FLESH: - FX_Impact(IMPACT_FLESH, trace_endpos, trace_plane_normal); - break; - case MATID_FOLIAGE: - FX_Impact(IMPACT_FOLIAGE, trace_endpos, trace_plane_normal); - break; - case MATID_GLASS: + if (trace_ent == world) { + TraceAttack_ImpactWorld(); + } else { + CBaseEntity foo = (CBaseEntity)trace_ent; + switch (foo.m_iMaterial) { + case BREAKMT_GLASS: FX_Impact(IMPACT_GLASS, trace_endpos, trace_plane_normal); break; - case MATID_GRATE: - FX_Impact(IMPACT_GRATE, trace_endpos, trace_plane_normal); - break; - case MATID_METAL: - FX_Impact(IMPACT_METAL, trace_endpos, trace_plane_normal); - break; - case MATID_SAND: - FX_Impact(IMPACT_SAND, trace_endpos, trace_plane_normal); - break; - case MATID_SLOSH: - FX_Impact(IMPACT_SLOSH, trace_endpos, trace_plane_normal); - break; - case MATID_SNOW: - FX_Impact(IMPACT_SNOW, trace_endpos, trace_plane_normal); - break; - case MATID_TILE: - FX_Impact(IMPACT_TILE, trace_endpos, trace_plane_normal); - break; - case MATID_VENT: - FX_Impact(IMPACT_VENT, trace_endpos, trace_plane_normal); - break; - case MATID_WOOD: + case BREAKMT_WOOD: FX_Impact(IMPACT_WOOD, trace_endpos, trace_plane_normal); break; - default: + case BREAKMT_METAL: + FX_Impact(IMPACT_METAL, trace_endpos, trace_plane_normal); + break; + case BREAKMT_FLESH: + FX_Impact(IMPACT_FLESH, trace_endpos, trace_plane_normal); + break; + case BREAKMT_CINDER: + FX_Impact(IMPACT_CONCRETE, trace_endpos, trace_plane_normal); + break; + case BREAKMT_TILE: + FX_Impact(IMPACT_TILE, trace_endpos, trace_plane_normal); + break; + case BREAKMT_COMPUTER: + FX_Impact(IMPACT_COMPUTER, trace_endpos, trace_plane_normal); + break; + case BREAKMT_GLASS_UNBREAKABLE: + FX_Impact(IMPACT_GLASS, trace_endpos, trace_plane_normal); + break; + case BREAKMT_ROCK: + FX_Impact(IMPACT_DEFAULT, trace_endpos, trace_plane_normal); + break; + case BREAKMT_NONE: FX_Impact(IMPACT_DEFAULT, trace_endpos, trace_plane_normal); break; } - break; - case BSPVER_Q3: /* Q3 */ - case BSPVER_RTCW: /* RtCW */ - case BSPVER_RBSP: /* RFVBSP */ - switch (trace_surfaceflagsi) { - case SURF_ALIEN: - FX_Impact(IMPACT_ALIEN, trace_endpos, trace_plane_normal); - break; - case SURF_COMPUTER: - FX_Impact(IMPACT_COMPUTER, trace_endpos, trace_plane_normal); - break; - case SURF_CONCRETE: - FX_Impact(IMPACT_CONCRETE, trace_endpos, trace_plane_normal); - break; - case SURF_DIRT: - FX_Impact(IMPACT_DIRT, trace_endpos, trace_plane_normal); - break; - case SURF_BLOODYFLESH: - FX_Impact(IMPACT_FLESH, trace_endpos, trace_plane_normal); - break; - case SURF_FOLIAGE: - FX_Impact(IMPACT_FOLIAGE, trace_endpos, trace_plane_normal); - break; - case SURF_GLASS: - FX_Impact(IMPACT_GLASS, trace_endpos, trace_plane_normal); - break; - case SURF_GRATE: - FX_Impact(IMPACT_GRATE, trace_endpos, trace_plane_normal); - break; - case SURF_METAL: - FX_Impact(IMPACT_METAL, trace_endpos, trace_plane_normal); - break; - case SURF_SAND: - FX_Impact(IMPACT_SAND, trace_endpos, trace_plane_normal); - break; - case SURF_SLOSH: - FX_Impact(IMPACT_SLOSH, trace_endpos, trace_plane_normal); - break; - case SURF_SNOW: - FX_Impact(IMPACT_SNOW, trace_endpos, trace_plane_normal); - break; - case SURF_TILE: - FX_Impact(IMPACT_TILE, trace_endpos, trace_plane_normal); - break; - case SURF_VENT: - FX_Impact(IMPACT_VENT, trace_endpos, trace_plane_normal); - break; - case SURF_WOOD: - FX_Impact(IMPACT_WOOD, trace_endpos, trace_plane_normal); - break; - default: - FX_Impact(IMPACT_DEFAULT, trace_endpos, trace_plane_normal); - break; - } - break; - default: - FX_Impact(IMPACT_DEFAULT, trace_endpos, trace_plane_normal); } } diff --git a/src/vgui/font.qc b/src/vgui/font.qc index ff5ce14c..e74b6d22 100644 --- a/src/vgui/font.qc +++ b/src/vgui/font.qc @@ -32,7 +32,7 @@ typedef struct } font_s; void -Font_Load (string strFile, font_s &fntNew) +Font_Load(string strFile, font_s &fntNew) { #ifdef CLASSIC_VGUI fntNew.iID = (int)loadfont("", "gfx/conchars", "12", -1, 0, 0); diff --git a/vmap b/vmap index d27598d4..9b687810 100755 --- a/vmap +++ b/vmap @@ -22,7 +22,7 @@ fi set -e if [ "$VMAP_NOBSP" != "1" ]; then - "$SCRPATH"/bin/vmap -v -custinfoparms -fs_basepath "$SCRPATH" -fs_game platform -threads $BUILD_PROC -samplesize 4 $* + "$SCRPATH"/bin/vmap -v -custinfoparms -fs_basepath "$SCRPATH" -fs_game platform -threads $BUILD_PROC $* fi if [ "$VMAP_NOVIS" != "1" ]; then @@ -39,24 +39,17 @@ if [ "$VMAP_NOLIGHT" != "1" ]; then -custinfoparms \ -fs_basepath "$SCRPATH" \ -v \ - -dirty \ -fs_game platform \ - -bounce 8 \ - -samplesize 4 \ -threads $BUILD_PROC \ - -shade \ - -shadeangle 60 \ - -patchshadows $* + $* else "$SCRPATH"/bin/vmap -light \ -custinfoparms \ -fs_basepath "$SCRPATH" \ -v \ -fs_game platform \ - -samplesize 64 \ -threads $BUILD_PROC \ - -shade \ - -shadeangle 60 \ - -patchshadows $* + -fast \ + $* fi fi