Go over the default.cfg's of all the example games. Make it so that

Skill_GetValue() requires a default value set.
This commit is contained in:
Marco Cawthorne 2020-12-12 01:54:00 +01:00
parent a95440b9f9
commit f38bf28b9e
53 changed files with 177 additions and 479 deletions

View File

@ -1,3 +1,5 @@
exec platform_default.cfg
// Generic Binds
bind "ESC" "togglemenu"
bind "w" "+forward"
@ -32,6 +34,8 @@ bind "y" "messagemode"
bind "u" "messagemode2"
bind "t" "impulse 201"
bind "f" "impulse 100"
bind "f1" "vote yes"
bind "f2" "vote no"
// Counter-Strike Binds
bind "b" "buy"
@ -57,55 +61,7 @@ seta "fcs_maxmoney" "16000"
seta "fcs_fillweapons" "0"
seta "fcs_autoreload" "0"
// Physics Variables
serverinfo "phy_stepheight" "18"
serverinfo "phy_airstepheight" "18"
serverinfo "phy_friction" "4"
serverinfo "phy_edgefriction" "1"
serverinfo "phy_stopspeed" "75"
serverinfo "phy_gravity" "800"
serverinfo "phy_airaccelerate" "10"
serverinfo "phy_accelerate" "4"
serverinfo "phy_maxspeed" "240"
// 2D/HUD Variables
seta "con_color" "255 150 0"
seta "vgui_color" "255 170 0"
seta "cross_color" "0 255 0"
seta "vid_conautoscale" "1"
seta "con_textsize" "12"
seta "cl_cursor_scale" "1"
seta "vid_conautoscale" "1"
seta "scr_conalpha" "1"
// View Variables
seta "cl_bob" "0"
seta "maxpitch" "89"
seta "minpitch" "-89"
seta "r_meshpitch" "1"
seta "v_bob" "0.01"
seta "v_bobcycle" "0.8"
seta "v_bobup" "0.5"
seta "v_contentblend" "0"
// 3D World Variables
seta "gl_blacklist_debug_glsl" "0"
seta "gl_overbright" "0"
seta "r_fb_models" "0"
seta "r_fullbrightSkins" "0"
seta "r_particledesc" "default"
seta "r_polygonoffset_submodel_factor" "0"
seta "r_polygonoffset_submodel_offset" "0"
seta "r_shadow_realtime_dlight_shadows" "0"
seta "r_shadow_realtime_world_shadows" "0"
// Misc defaults
seta "cfg_save_auto" "1"
seta "cl_idlefps" "60"
seta "cl_maxfps" "250"
seta "com_nogamedirnativecode" "0"
seta "con_logcenterprint" "0"
seta "con_notifylines" "0"
seta "lang" "en_us"
seta "r_imageexensions" "tga bmp pcx"
seta "scr_sshot_type" "tga"

View File

@ -1,3 +1,5 @@
exec platform_default.cfg
// Generic Binds
bind "ESC" "togglemenu"
bind "w" "+forward"
@ -32,6 +34,8 @@ bind "y" "messagemode"
bind "u" "messagemode2"
bind "t" "impulse 201"
bind "f" "impulse 100"
bind "f1" "vote yes"
bind "f2" "vote no"
// Game Variables
seta "hostname" "Opposing Force Server"
@ -39,55 +43,7 @@ name "Shephard"
model shephard
seta "maxplayers" "8"
// Physics Variables
serverinfo "phy_stepheight" "18"
serverinfo "phy_airstepheight" "18"
serverinfo "phy_friction" "4"
serverinfo "phy_edgefriction" "1"
serverinfo "phy_stopspeed" "75"
serverinfo "phy_gravity" "800"
serverinfo "phy_airaccelerate" "10"
serverinfo "phy_accelerate" "8"
serverinfo "phy_maxspeed" "270"
// 2D/HUD Variables
seta "con_color" "0 255 0"
seta "vgui_color" "0 255 0"
seta "cross_color" "0 255 0"
seta "vid_conautoscale" "1"
seta "con_textsize" "12"
seta "cl_cursor_scale" "1"
seta "vid_conautoscale" "1"
seta "scr_conalpha" "1"
// View Variables
seta "cl_bob" "0"
seta "maxpitch" "89"
seta "minpitch" "-89"
seta "r_meshpitch" "1"
seta "v_bob" "0.01"
seta "v_bobcycle" "0.8"
seta "v_bobup" "0.5"
seta "v_contentblend" "0"
// 3D World Variables
seta "gl_blacklist_debug_glsl" "0"
seta "gl_overbright" "0"
seta "r_fb_models" "0"
seta "r_fullbrightSkins" "0"
seta "r_particledesc" "default"
seta "r_polygonoffset_submodel_factor" "0"
seta "r_polygonoffset_submodel_offset" "0"
seta "r_shadow_realtime_dlight_shadows" "0"
seta "r_shadow_realtime_world_shadows" "0"
// Misc defaults
seta "cfg_save_auto" "1"
seta "cl_idlefps" "60"
seta "cl_maxfps" "250"
seta "com_nogamedirnativecode" "0"
seta "con_logcenterprint" "0"
seta "con_notifylines" "0"
seta "lang" "en_us"
seta "r_imageexensions" "tga bmp pcx"
seta "scr_sshot_type" "tga"

View File

@ -1,3 +1,5 @@
exec platform_default.cfg
// Generic Binds
bind "ESC" "togglemenu"
bind "w" "+forward"
@ -32,6 +34,8 @@ bind "y" "messagemode"
bind "u" "messagemode2"
bind "t" "impulse 201"
bind "f" "impulse 100"
bind "f1" "vote yes"
bind "f2" "vote no"
// Game Variables
seta "hostname" "They Hunger Server"
@ -39,55 +43,7 @@ name "Einar"
model nypdcop
seta "maxplayers" "8"
// Physics Variables
serverinfo "phy_stepheight" "18"
serverinfo "phy_airstepheight" "18"
serverinfo "phy_friction" "4"
serverinfo "phy_edgefriction" "1"
serverinfo "phy_stopspeed" "75"
serverinfo "phy_gravity" "800"
serverinfo "phy_airaccelerate" "10"
serverinfo "phy_accelerate" "8"
serverinfo "phy_maxspeed" "270"
// 2D/HUD Variables
seta "con_color" "255 0 0"
seta "vgui_color" "255 0 0"
seta "cross_color" "255 0 0"
seta "vid_conautoscale" "1"
seta "con_textsize" "12"
seta "cl_cursor_scale" "1"
seta "vid_conautoscale" "1"
seta "scr_conalpha" "1"
// View Variables
seta "cl_bob" "0"
seta "maxpitch" "89"
seta "minpitch" "-89"
seta "r_meshpitch" "1"
seta "v_bob" "0.01"
seta "v_bobcycle" "0.8"
seta "v_bobup" "0.5"
seta "v_contentblend" "0"
// 3D World Variables
seta "gl_blacklist_debug_glsl" "0"
seta "gl_overbright" "0"
seta "r_fb_models" "0"
seta "r_fullbrightSkins" "0"
seta "r_particledesc" "default"
seta "r_polygonoffset_submodel_factor" "0"
seta "r_polygonoffset_submodel_offset" "0"
seta "r_shadow_realtime_dlight_shadows" "0"
seta "r_shadow_realtime_world_shadows" "0"
// Misc defaults
seta "cfg_save_auto" "1"
seta "cl_idlefps" "60"
seta "cl_maxfps" "250"
seta "com_nogamedirnativecode" "0"
seta "con_logcenterprint" "0"
seta "con_notifylines" "0"
seta "lang" "en_us"
seta "r_imageexensions" "tga bmp pcx"
seta "scr_sshot_type" "tga"

View File

@ -1,67 +1,7 @@
// fake 3dfx voodoo settings
// aesthetic feature only
seta gl_texturemode GL_LINEAR_MIPMAP_LINEAR
seta d_mipcap 0 1000
// no limitations
seta gl_max_size 8192
// make sure those gl vars are set to a minimal setting
seta gl_affinemodels 0
seta gl_blendsprites 0
seta gl_flashblend 0
seta gl_overbright 2
seta gl_picmip 0
seta gl_polyblend 1
seta gl_specular 0
seta gl_texture_anisotropic_filtering 0
seta gl_kdither 0
// interpolation
seta cl_nolerp 0
seta r_noframegrouplerp 0
seta r_nolerp 0
// lighting
seta r_lightmap 0
seta r_lightmap_format e5bgr9
seta r_lightmap_saturation 1
seta r_nolightdir 0
seta r_loadlit 1
// FBO settings
seta r_renderscale 1
// glsl trickery
seta r_glsl_offsetmapping 0
seta r_softwarebanding 0
seta r_postprocshader ""
seta gl_ldr 0
// colormap related
seta r_fb_bmodels 1
seta r_fb_models 1
// shadows
seta r_shadows 1
seta r_shadow_realtime_dlight 1
seta r_shadow_realtime_dlight_shadows 1
seta r_shadow_realtime_world 1
// rest of the video gang
seta r_bloom 0
seta r_coronas 0
seta r_deluxemapping 1
seta r_drawflame 1
seta r_drawflat 0
seta r_dynamic 1
seta r_fastsky 0
seta r_lavastyle 1
seta r_stains 0
seta r_waterstyle 1
seta r_waterwarp 1
seta vid_hardwaregamma 1
exec platform_default.cfg
// apply
vid_reload

View File

@ -0,0 +1,96 @@
seta con_textsize -12
seta scr_conalpha 1
seta cl_idlefps 0
seta r_ignoreentpvs 0
seta allow_download_packages 0
seta _pext_infoblobs 1
seta _q3bsp_bihtraces 1
seta sv_gameplayfix_setmodelsize_qw 1
seta sv_gameplayfix_setmodelrealbox 1
seta gl_font 0
seta gl_font CONCHARS?fmt=h
seta gl_texturemode GL_LINEAR_MIPMAP_LINEAR
seta d_mipcap 0 1000
// no limitations
seta gl_max_size 8192
// make sure those gl vars are set to a minimal setting
seta gl_affinemodels 0
seta gl_blendsprites 0
seta gl_flashblend 0
seta gl_overbright 2
seta gl_picmip 0
seta gl_polyblend 1
seta gl_specular 0
seta gl_texture_anisotropic_filtering 0
seta gl_kdither 0
seta gl_mindist 4
// interpolation
seta cl_nolerp 0
seta r_noframegrouplerp 0
seta r_nolerp 0
// lighting
seta r_lightmap 0
seta r_lightmap_format e5bgr9
seta r_lightmap_saturation 1
seta r_nolightdir 0
seta r_loadlit 1
// FBO settings
seta r_renderscale 1
// glsl trickery
seta r_glsl_offsetmapping 0
seta r_softwarebanding 0
seta r_postprocshader ""
seta gl_ldr 0
// colormap related
seta r_fb_bmodels 1
seta r_fb_models 1
// shadows
seta r_shadows 1
seta r_shadow_realtime_dlight 1
seta r_shadow_realtime_dlight_shadows 1
seta r_shadow_realtime_world 1
// rest of the video gang
seta r_bloom 0
seta r_coronas 0
seta r_deluxemapping 1
seta r_drawflame 1
seta r_drawflat 0
seta r_dynamic 1
seta r_fastsky 0
seta r_lavastyle 1
seta r_stains 0
seta r_waterstyle 1
seta r_waterwarp 1
seta "r_particledesc" "default"
seta vid_hardwaregamma 1
seta "cl_cursor_scale" "1"
seta "cl_bob" "0"
seta "maxpitch" "89"
seta "minpitch" "-89"
seta "r_meshpitch" "1"
seta "v_bob" "0.01"
seta "v_bobcycle" "0.8"
seta "v_bobup" "0.5"
seta "v_contentblend" "0"
// Misc defaults
seta "cfg_save_auto" "1"
seta "cl_idlefps" "60"
seta "cl_maxfps" "250"
seta "com_nogamedirnativecode" "0"
seta "con_logcenterprint" "0"
seta "con_notifylines" "0"
seta "lang" "en_us"
seta "r_imageexensions" "tga bmp pcx png jpg"
seta "scr_sshot_type" "tga"
seta "media_repeat "0"

View File

@ -1,3 +1,5 @@
exec platform_default.cfg
// Generic Binds
bind "ESC" "togglemenu"
bind "w" "+forward"
@ -32,56 +34,10 @@ bind "y" "messagemode"
bind "u" "messagemode2"
bind "t" "impulse 201"
bind "f" "impulse 100"
// Physics Variables
serverinfo "phy_stepheight" "18"
serverinfo "phy_airstepheight" "18"
serverinfo "phy_friction" "4"
serverinfo "phy_edgefriction" "1"
serverinfo "phy_stopspeed" "75"
serverinfo "phy_gravity" "800"
serverinfo "phy_airaccelerate" "10"
serverinfo "phy_accelerate" "8"
serverinfo "phy_maxspeed" "270"
bind "f1" "vote yes"
bind "f2" "vote no"
// 2D/HUD Variables
seta "con_color" "193 207 204"
seta "vgui_color" "0 255 0"
seta "cross_color" "0 255 0"
seta "vid_conautoscale" "1"
seta "con_textsize" "12"
seta "cl_cursor_scale" "1"
seta "vid_conautoscale" "1"
seta "scr_conalpha" "1"
// View Variables
seta "cl_bob" "0"
seta "maxpitch" "89"
seta "minpitch" "-89"
seta "r_meshpitch" "1"
seta "v_bob" "0.01"
seta "v_bobcycle" "0.8"
seta "v_bobup" "0.5"
seta "v_contentblend" "0"
// 3D World Variables
seta "gl_blacklist_debug_glsl" "0"
seta "gl_overbright" "0"
seta "r_fb_models" "0"
seta "r_fullbrightSkins" "0"
seta "r_particledesc" "default"
seta "r_polygonoffset_submodel_factor" "0"
seta "r_polygonoffset_submodel_offset" "0"
seta "r_shadow_realtime_dlight_shadows" "0"
seta "r_shadow_realtime_world_shadows" "0"
// Misc defaults
seta "cfg_save_auto" "1"
seta "cl_idlefps" "60"
seta "cl_maxfps" "250"
seta "com_nogamedirnativecode" "0"
seta "con_logcenterprint" "0"
seta "con_notifylines" "0"
seta "lang" "en_us"
seta "r_imageexensions" "tga bmp pcx"
seta "scr_sshot_type" "tga"

View File

@ -1,3 +1,5 @@
exec platform_default.cfg
// Generic Binds
bind "ESC" "togglemenu"
bind "w" "+forward"
@ -32,60 +34,14 @@ bind "y" "messagemode"
bind "u" "messagemode2"
bind "t" "impulse 201"
bind "f" "impulse 100"
bind "f1" "vote yes"
bind "f2" "vote no"
// Game Variables
seta "hostname" "FreeSH Server"
seta "maxplayers" "8"
// Physics Variables
serverinfo "phy_stepheight" "18"
serverinfo "phy_airstepheight" "18"
serverinfo "phy_friction" "4"
serverinfo "phy_edgefriction" "1"
serverinfo "phy_stopspeed" "75"
serverinfo "phy_gravity" "800"
serverinfo "phy_airaccelerate" "10"
serverinfo "phy_accelerate" "8"
serverinfo "phy_maxspeed" "270"
// 2D/HUD Variables
seta "con_color" "255 255 215"
seta "vgui_color" "255 255 215"
seta "cross_color" "0 255 0"
seta "vid_conautoscale" "1"
seta "con_textsize" "12"
seta "cl_cursor_scale" "1"
seta "vid_conautoscale" "1"
seta "scr_conalpha" "1"
// View Variables
seta "cl_bob" "0"
seta "maxpitch" "89"
seta "minpitch" "-89"
seta "r_meshpitch" "1"
seta "v_bob" "0.01"
seta "v_bobcycle" "0.8"
seta "v_bobup" "0.5"
seta "v_contentblend" "0"
// 3D World Variables
seta "gl_blacklist_debug_glsl" "0"
seta "gl_overbright" "0"
seta "r_fb_models" "0"
seta "r_fullbrightSkins" "0"
seta "r_particledesc" "default"
seta "r_polygonoffset_submodel_factor" "0"
seta "r_polygonoffset_submodel_offset" "0"
seta "r_shadow_realtime_dlight_shadows" "0"
seta "r_shadow_realtime_world_shadows" "0"
// Misc defaults
seta "cfg_save_auto" "1"
seta "cl_idlefps" "60"
seta "cl_maxfps" "250"
seta "com_nogamedirnativecode" "0"
seta "con_logcenterprint" "0"
seta "con_notifylines" "0"
seta "lang" "en_us"
seta "r_imageexensions" "tga bmp pcx"
seta "scr_sshot_type" "tga"

View File

@ -98,7 +98,7 @@ class CBaseMonster:CBaseEntity
int m_iFlags;
vector base_mins;
vector base_maxs;
int base_health;
float base_health;
float m_flChaseSpeed;

View File

@ -22,6 +22,7 @@
"texturename" Name of the texture to be cast as a light.
"farz" Distance to which this projected light will be cast.
"nearz" Clipping distance for near objects that won't get lit.
"pattern" Sets a custom pattern. 'style' overrides this.
Inputs:
"TurnOff" Turns the entity off.
@ -32,6 +33,7 @@ Inputs:
"SetLightStyle" Sets the light appearance integer.
"SetNearZ" Sets clipping distance for near objects that won't get lit.
"SetFarZ" Sets distance to which this projected light will be cast.
"SetPattern" Sets the style pattern of the light to a custom one.
Textured light projected. This is the type of lighting that's used for
flashlights, lamp spotlights and so on.

View File

@ -149,4 +149,3 @@ enum
};
void m_hide(void);
void cvar_init(void);

View File

@ -35,25 +35,6 @@ IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING\
OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\
==============================================================================";
void
cvar_init(void)
{
/* TODO: Shove these into defaults.cfg instead of forcing them */
localcmd("seta con_textsize -12\n");
localcmd("seta scr_conalpha 1\n");
localcmd("seta cl_idlefps 0\n");
localcmd("seta r_ignoreentpvs 0\n");
localcmd("seta allow_download_packages 0\n");
localcmd("seta gl_mindist 4\n"); // Thanks Valve for v_shotgun.mdl
localcmd("seta _pext_infoblobs 1\n");
localcmd("seta r_shadow_realtime_dlight 1");
localcmd("seta r_shadow_realtime_dlight_shadows 1");
/* Hack! */
localcmd("seta gl_font 0\n");
localcmd("seta gl_font CONCHARS?fmt=h\n");
}
var int autocvar_r_autoscale = TRUE;
void
Menu_AutoScale(void)
@ -108,7 +89,6 @@ m_init(void)
localcmd("plug_load ffmpeg\n");
cvar_init();
shaderforname("logo_avi", "{\n{\nvideomap av:media/logo.avi\n}\n}");
for (int i = 0; i < g_bmp.length; i++) {

View File

@ -367,7 +367,6 @@ customgame_btnactivate_start(void)
localcmd("menu_restart\n");
localcmd("menu_customgame\n");
localcmd("menu_musicstart\n");
cvar_init();
}
void

View File

@ -25,8 +25,9 @@ Skill_Init(void)
}
float
Skill_GetValue(string variable)
Skill_GetValue(string variable, float defaultvalue)
{
float skill = cvar("skill");
return cvar(sprintf("sk_%s%d", variable, skill));
float val = fabs(cvar(sprintf("sk_%s%d", variable, skill)));
return (val == 0) ? defaultvalue : val;
}

View File

@ -16,4 +16,4 @@
*/
void Skill_Init(void);
float Skill_GetValue(string);
float Skill_GetValue(string, float);

View File

@ -46,7 +46,7 @@ void item_battery::touch(void)
return;
}
/* Move this somewhere else? */
pl.armor += Skill_GetValue("battery");
pl.armor += Skill_GetValue("battery", 15);
if (pl.armor > 100) {
pl.armor = 100;
}

View File

@ -147,6 +147,6 @@ monster_alien_grunt::monster_alien_grunt(void)
model = "models/agrunt.mdl";
base_mins = [-32,-32,0];
base_maxs = [32,32,64];
base_health = Skill_GetValue("agrunt_health");
base_health = Skill_GetValue("agrunt_health", 90);
CBaseMonster::CBaseMonster();
}

View File

@ -246,7 +246,7 @@ monster_alien_slave::monster_alien_slave(void)
netname = "Alien Slave";
model = "models/islave.mdl";
base_health = Skill_GetValue("islave_health");
base_health = Skill_GetValue("islave_health", 30);
base_mins = [-16,-16,0];
base_maxs = [16,16,72];
m_iAlliance = MAL_ALIEN;

View File

@ -43,6 +43,6 @@ void monster_apache::monster_apache(void)
model = "models/apache.mdl";
base_mins = [-16,-16,0];
base_maxs = [16,16,72];
base_health = Skill_GetValue("apache_health");
base_health = Skill_GetValue("apache_health", 250);
CBaseMonster::CBaseMonster();
}

View File

@ -78,6 +78,6 @@ void monster_barnacle::monster_barnacle(void)
model = "models/barnacle.mdl";
base_mins = [-16,-16,-36];
base_maxs = [16,16,0];
base_health = Skill_GetValue("barnacle_health");
base_health = Skill_GetValue("barnacle_health", 25);
CBaseMonster::CBaseMonster();
}

View File

@ -201,7 +201,7 @@ monster_barney::monster_barney(void)
model = "models/barney.mdl";
netname = "Barney";
base_health = Skill_GetValue("barney_health");
base_health = Skill_GetValue("barney_health", 35);
base_mins = [-16,-16,0];
base_maxs = [16,16,72];
m_iAlliance = MAL_FRIEND;

View File

@ -125,7 +125,7 @@ void monster_bigmomma::monster_bigmomma(void)
netname = "Gonarch";
model = "models/big_mom.mdl";
/* health is based on factor, for it's not killable until last stage */
base_health = Skill_GetValue("bigmomma_health_factor") * 300;
base_health = Skill_GetValue("bigmomma_health_factor", 1.5) * 300;
base_mins = [-95,-95,0];
base_maxs = [95,95,190];
CBaseMonster::CBaseMonster();

View File

@ -148,7 +148,7 @@ void monster_bullchicken::monster_bullchicken(void)
Sound_Precache("monster_bullchicken.pain");
netname = "Bullsquid";
model = "models/bullsquid.mdl";
base_health = Skill_GetValue("bullsquid_health");
base_health = Skill_GetValue("bullsquid_health", 40);
base_mins = [-32,-32,0];
base_maxs = [32,32,64];
CBaseMonster::CBaseMonster();

View File

@ -131,7 +131,7 @@ void monster_gargantua::monster_gargantua(void)
Sound_Precache("monster_gargantua.step");
netname = "Gargantua";
model = "models/garg.mdl";
base_health = Skill_GetValue("gargantua_health");
base_health = Skill_GetValue("gargantua_health", 800);
base_mins = [-32,-32,0];
base_maxs = [32,32,128];
CBaseMonster::CBaseMonster();

View File

@ -167,11 +167,11 @@ monster_headcrab::monster_headcrab(void)
if (classname == "monster_babycrab") {
netname = "Baby Headcrab";
model = "models/baby_headcrab.mdl";
base_health = Skill_GetValue ("headcrab_health") /4;
base_health = Skill_GetValue ("headcrab_health", 10) /4;
} else {
netname = "Headcrab";
model = "models/headcrab.mdl";
base_health = Skill_GetValue("headcrab_health");
base_health = Skill_GetValue("headcrab_health", 10);
}
base_mins = [-16,-16,0];

View File

@ -194,7 +194,7 @@ monster_houndeye::monster_houndeye(void)
Sound_Precache("monster_houndeye.pain");
netname = "Houndeye";
model = "models/houndeye.mdl";
base_health = Skill_GetValue("houndeye_health");
base_health = Skill_GetValue("houndeye_health", 20);
base_mins = [-16,-16,0];
base_maxs = [16,16,36];
m_iAlliance = MAL_ALIEN;

View File

@ -87,7 +87,7 @@ monster_human_assassin::monster_human_assassin(void)
{
netname = "Assassin";
model = "models/hassassin.mdl";
base_health = Skill_GetValue("hassassin_health");
base_health = Skill_GetValue("hassassin_health", 50);
base_mins = [-16,-16,0];
base_maxs = [16,16,72];
CBaseMonster::CBaseMonster();

View File

@ -311,7 +311,7 @@ void monster_human_grunt::monster_human_grunt(void)
netname = "Grunt";
model = "models/hgrunt.mdl";
base_health = Skill_GetValue("hgrunt_health");
base_health = Skill_GetValue("hgrunt_health", 50);
base_mins = [-16,-16,0];
base_maxs = [16,16,72];
m_iAlliance = MAL_ENEMY;

View File

@ -127,7 +127,7 @@ void monster_nihilanth::monster_nihilanth(void)
Sound_Precache("monster_nihilanth.recharge");
netname = "Nihilanth";
model = "models/nihilanth.mdl";
base_health = Skill_GetValue("nihilanth_health");
base_health = Skill_GetValue("nihilanth_health", 800);
base_mins = [-192,-192,-32];
base_maxs = [192,192,384];
CBaseMonster::CBaseMonster();

View File

@ -206,7 +206,7 @@ monster_scientist::monster_scientist(void)
model = "models/scientist.mdl";
base_mins = [-16,-16,0];
base_maxs = [16,16,72];
base_health = Skill_GetValue("scientist_health");
base_health = Skill_GetValue("scientist_health", 20);
CBaseNPC::CBaseNPC();

View File

@ -71,7 +71,7 @@ void monster_sentry::monster_sentry(void)
Sound_Precache("monster_sentry.retract");
netname = "Sentry";
model = "models/sentry.mdl";
base_health = Skill_GetValue("sentry_health");
base_health = Skill_GetValue("sentry_health", 40);
base_mins = [-16,-16,0];
base_maxs = [16,16,72];
CBaseMonster::CBaseMonster();

View File

@ -214,7 +214,7 @@ monster_zombie::monster_zombie(void)
Sound_Precache("monster_zombie.pain");
netname = "Zombie";
model = "models/zombie.mdl";
base_health = Skill_GetValue("zombie_health");
base_health = Skill_GetValue("zombie_health", 50);
base_mins = [-16,-16,0];
base_maxs = [16,16,72];
m_iAlliance = MAL_ALIEN;

View File

@ -47,7 +47,7 @@ void Player_UseDown(void)
vecSrc = self.origin + self.view_ofs;
self.hitcontentsmaski = CONTENTBITS_POINTSOLID;
traceline(vecSrc, vecSrc + (v_forward * 64), MOVE_NORMAL, self);
traceline(vecSrc, vecSrc + (v_forward * 64), MOVE_HITMODEL, self);
if (trace_ent.PlayerUse) {

View File

@ -129,11 +129,11 @@ w_silencer_primary(void)
/* Different sound & accuracy without silencer */
if (pl.a_ammo3 == 1) {
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, Skill_GetValue("plr_9mm_bullet"), [0.01, 0.01], WEAPON_GLOCK);
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, Skill_GetValue("plr_9mm_bullet", 8), [0.01, 0.01], WEAPON_GLOCK);
Sound_Play(pl, CHAN_WEAPON, "weapon_silencer.fire");
} else {
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, Skill_GetValue("plr_9mm_bullet"), [0.1,0.1], WEAPON_GLOCK);
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, Skill_GetValue("plr_9mm_bullet", 8), [0.1,0.1], WEAPON_GLOCK);
Sound_Play(pl, CHAN_WEAPON, "weapon_glock.fire");
}

View File

@ -123,7 +123,7 @@ w_spanner_primary(void)
}
if (trace_ent.takedamage) {
Damage_Apply(trace_ent, pl, Skill_GetValue("plr_crowbar"), WEAPON_CROWBAR, DMG_BLUNT);
Damage_Apply(trace_ent, pl, Skill_GetValue("plr_crowbar", 10), WEAPON_CROWBAR, DMG_BLUNT);
if (!trace_ent.iBleeds) {
return;

View File

@ -67,7 +67,7 @@ void w_tnt_throw(void)
{
static void WeaponFrag_Throw_Explode(void)
{
float dmg = Skill_GetValue("plr_hand_grenade");
float dmg = Skill_GetValue("plr_hand_grenade", 100);
FX_Explosion(self.origin);
Damage_Radius(self.origin, self.owner, dmg, dmg * 2.5f, TRUE, WEAPON_HANDGRENADE);
sound(self, CHAN_WEAPON, sprintf("weapons/explode%d.wav", floor(random() * 2) + 3), 1, ATTN_NORM);

View File

@ -116,7 +116,7 @@ void s_pipebomb_detonate(entity master)
{
for (entity b = world; (b = find(b, ::classname, "satchel"));) {
if (b.owner == master) {
float dmg = Skill_GetValue("plr_satchel");
float dmg = Skill_GetValue("plr_satchel", 150);
FX_Explosion(b.origin);
Damage_Radius(b.origin, master, dmg, dmg * 2.5f, TRUE, WEAPON_SATCHEL);
sound(b, CHAN_WEAPON, sprintf("weapons/explode%d.wav", floor(random() * 2) + 3), 1, ATTN_NORM);

View File

@ -145,7 +145,7 @@ void w_cannon_primary(void)
return;
}
dmg = Skill_GetValue("plr_cannon");
dmg = Skill_GetValue("plr_cannon", 5);
TraceAttack_FireBullets(20, pl.origin + pl.view_ofs, dmg, [0.08716,0.04362], WEAPON_CANNON);
pl.cannon_mag -= 2;
Weapons_PlaySound(pl, CHAN_WEAPON, "cannon/fire.wav", 1, ATTN_NORM);
@ -178,7 +178,7 @@ void w_cannon_secondary(void)
return;
}
dmg = Skill_GetValue("plr_cannon");
dmg = Skill_GetValue("plr_cannon", 5);
TraceAttack_FireBullets(10, pl.origin + pl.view_ofs, dmg, [0.08716,0.04362], WEAPON_CANNON);
pl.cannon_mag--;
Weapons_PlaySound(pl, CHAN_WEAPON, "cannon/fire.wav", 1, ATTN_NORM);

View File

@ -102,7 +102,7 @@ void w_chainsaw_primary(void)
/* Push the player towards the victim */
pl.velocity = normalize(trace_ent.origin - pl.origin) * 240;
}
dmg = Skill_GetValue("plr_chainsaw");
dmg = Skill_GetValue("plr_chainsaw", 10);
Damage_Apply(trace_ent, self, dmg, WEAPON_CHAINSAW, DMG_BLUNT);
Weapons_PlaySound(pl, CHAN_WEAPON, "sh/chainsaw_cutintoflesh.wav", 1, ATTN_NORM);
} else {

View File

@ -130,9 +130,9 @@ void w_hammer_release(void)
/* players only take half damage */
if (trace_ent.classname == "player")
hdmg = Skill_GetValue("plr_hammer") / 2;
hdmg = Skill_GetValue("plr_hammer", 100) / 2;
else
hdmg = Skill_GetValue("plr_hammer");
hdmg = Skill_GetValue("plr_hammer", 100);
Damage_Apply(trace_ent, self, hdmg, WEAPON_HAMMER, DMG_BLUNT);
@ -154,7 +154,7 @@ void w_hammer_release(void)
#ifdef SERVER
if (trace_ent.takedamage) {
hitsound = floor(random(1, 4));
hdmg = Skill_GetValue("plr_hammeralt");
hdmg = Skill_GetValue("plr_hammeralt", 200);
Damage_Apply(trace_ent, self, hdmg, WEAPON_HAMMER, DMG_BLUNT);
} else {
if (trace_fraction < 1.0) {

View File

@ -117,7 +117,7 @@ w_crossbow_holster(void)
void Crossbolt_Touch(void) {
/* explode mode, multiplayer */
if (self.weapon) {
float dmg = Skill_GetValue("plr_xbow_bolt_monster");
float dmg = Skill_GetValue("plr_xbow_bolt_monster", 50);
FX_Explosion(self.origin);
Damage_Radius(self.origin, self.owner, dmg, dmg * 2.5f, TRUE, WEAPON_CROSSBOW);
if (random() < 0.5) {
@ -138,7 +138,7 @@ void Crossbolt_Touch(void) {
}
/* anything else that can take damage */
Damage_Apply(other, self.owner, Skill_GetValue("plr_xbow_bolt_monster"), WEAPON_CROSSBOW, DMG_BLUNT);
Damage_Apply(other, self.owner, Skill_GetValue("plr_xbow_bolt_monster", 50), WEAPON_CROSSBOW, DMG_BLUNT);
Sound_Play(self, 1, "weapon_crossbow.hitbody");
if (other.iBleeds == FALSE) {

View File

@ -148,7 +148,7 @@ w_crowbar_primary(void)
}
if (trace_ent.takedamage) {
Damage_Apply(trace_ent, pl, Skill_GetValue("plr_crowbar"), WEAPON_CROWBAR, DMG_BLUNT);
Damage_Apply(trace_ent, pl, Skill_GetValue("plr_crowbar", 10), WEAPON_CROWBAR, DMG_BLUNT);
if (trace_ent.iBleeds) {
Sound_Play(self, CHAN_WEAPON, "weapon_crowbar.hitbody");
}

View File

@ -154,7 +154,7 @@ w_glock_primary(void)
}
#else
pl.glock_mag--;
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, Skill_GetValue("plr_9mm_bullet"), [0.01,0.01], WEAPON_GLOCK);
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, Skill_GetValue("plr_9mm_bullet", 8), [0.01,0.01], WEAPON_GLOCK);
Sound_Play(pl, CHAN_WEAPON, "weapon_glock.fire");
if (self.flags & FL_CROUCHING)
@ -199,7 +199,7 @@ w_glock_secondary(void)
}
#else
pl.glock_mag--;
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, Skill_GetValue("plr_9mm_bullet"), [0.1,0.1], WEAPON_GLOCK);
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, Skill_GetValue("plr_9mm_bullet", 8), [0.1,0.1], WEAPON_GLOCK);
Sound_Play(pl, CHAN_WEAPON, "weapon_glock.fire");
if (self.flags & FL_CROUCHING)

View File

@ -83,7 +83,7 @@ void w_handgrenade_throw(void)
{
static void WeaponFrag_Throw_Explode(void)
{
float dmg = Skill_GetValue("plr_hand_grenade");
float dmg = Skill_GetValue("plr_hand_grenade", 150);
FX_Explosion(self.origin);
Damage_Radius(self.origin, self.owner, dmg, dmg * 2.5f, TRUE, WEAPON_HANDGRENADE);
sound(self, CHAN_WEAPON, sprintf("weapons/explode%d.wav", floor(random() * 2) + 3), 1, ATTN_NORM);

View File

@ -106,7 +106,7 @@ w_hornetgun_shoothornet(void)
{
static void Hornet_Touch(void) {
if (other.takedamage == DAMAGE_YES) {
Damage_Apply(other, self.owner, Skill_GetValue("plr_hornet"), WEAPON_HORNETGUN, DMG_GENERIC);
Damage_Apply(other, self.owner, Skill_GetValue("plr_hornet", 10), WEAPON_HORNETGUN, DMG_GENERIC);
Sound_Play(other, CHAN_VOICE, "weapon_hornetgun.hit");
} else {
Sound_Play(self, CHAN_VOICE, "weapon_hornetgun.buzz");

View File

@ -150,9 +150,9 @@ w_mp5_primary(void)
#else
/* singleplayer is more accurate */
if (cvar("sv_playerslots") == 1) {
TraceAttack_FireBullets(1, Weapons_GetCameraPos(), Skill_GetValue("plr_9mmAR_bullet"), [0.025,0.025], WEAPON_MP5);
TraceAttack_FireBullets(1, Weapons_GetCameraPos(), Skill_GetValue("plr_9mmAR_bullet", 5), [0.025,0.025], WEAPON_MP5);
} else {
TraceAttack_FireBullets(1, Weapons_GetCameraPos(), Skill_GetValue("plr_9mmAR_bullet"), [0.05,0.05], WEAPON_MP5);
TraceAttack_FireBullets(1, Weapons_GetCameraPos(), Skill_GetValue("plr_9mmAR_bullet", 5), [0.05,0.05], WEAPON_MP5);
}
Sound_Play(pl, CHAN_WEAPON, "weapon_mp5.shoot");
@ -193,7 +193,7 @@ w_mp5_secondary(void)
Weapons_ViewAnimation(MP5_GRENADE);
#else
static void Grenade_ExplodeTouch(void) {
float dmg = Skill_GetValue("plr_9mmAR_grenade");
float dmg = Skill_GetValue("plr_9mmAR_grenade", 100);
FX_Explosion(self.origin);
Damage_Radius(self.origin, self.owner, dmg, dmg * 2.5f, TRUE, WEAPON_MP5);

View File

@ -156,7 +156,7 @@ w_python_primary(void)
Weapons_ViewAnimation(PYTHON_FIRE1);
#else
pl.python_mag--;
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, Skill_GetValue("plr_357_bullet"), [0.008, 0.008], WEAPON_PYTHON);
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, Skill_GetValue("plr_357_bullet", 40), [0.008, 0.008], WEAPON_PYTHON);
Sound_Play(pl, CHAN_WEAPON, "weapon_357.shoot");
#endif

View File

@ -125,7 +125,7 @@ void w_rpg_primary(void)
Weapons_ViewPunchAngle([-10,0,0]);
#else
static void Rocket_Touch(void) {
float dmg = Skill_GetValue("plr_rpg");
float dmg = Skill_GetValue("plr_rpg", 100);
FX_Explosion(self.origin);
Damage_Radius(self.origin, self.owner, dmg, dmg * 2.5f, TRUE, WEAPON_RPG);
sound(self, CHAN_WEAPON, sprintf("weapons/explode%d.wav", floor(random() * 2) + 3), 1, ATTN_NORM);

View File

@ -73,7 +73,7 @@ s_satchel_detonate(entity master)
{
for (entity b = world; (b = find(b, ::classname, "satchel"));) {
if (b.owner == master) {
float dmg = Skill_GetValue("plr_satchel");
float dmg = Skill_GetValue("plr_satchel", 150);
FX_Explosion(b.origin);
Damage_Radius(b.origin, master, dmg, dmg * 2.5f, TRUE, WEAPON_SATCHEL);
sound(b, CHAN_WEAPON, sprintf("weapons/explode%d.wav", floor(random() * 2) + 3), 1, ATTN_NORM);

View File

@ -130,9 +130,9 @@ void w_shotgun_primary(void)
#ifdef SERVER
/* Singleplayer is more accurate */
if (cvar("sv_playerslots") == 1) {
TraceAttack_FireBullets(6, pl.origin + pl.view_ofs, Skill_GetValue("plr_buckshot"), [0.08716,0.08716], WEAPON_SHOTGUN);
TraceAttack_FireBullets(6, pl.origin + pl.view_ofs, Skill_GetValue("plr_buckshot", 5), [0.08716,0.08716], WEAPON_SHOTGUN);
} else {
TraceAttack_FireBullets(4, pl.origin + pl.view_ofs, Skill_GetValue("plr_buckshot"), [0.08716,0.04362], WEAPON_SHOTGUN);
TraceAttack_FireBullets(4, pl.origin + pl.view_ofs, Skill_GetValue("plr_buckshot", 5), [0.08716,0.04362], WEAPON_SHOTGUN);
}
Sound_Play(pl, CHAN_WEAPON, "weapon_shotgun.single");
pl.shotgun_mag--;

View File

@ -86,7 +86,7 @@ monster_snark::customphysics(void)
if (trace_ent.takedamage == DAMAGE_YES) {
Sound_Play(this, CHAN_BODY, "weapon_snark.deploy");
Damage_Apply(trace_ent, real_owner, Skill_GetValue("snark_dmg_bite"), WEAPON_SNARK, DMG_GENERIC);
Damage_Apply(trace_ent, real_owner, Skill_GetValue("snark_dmg_bite", 10), WEAPON_SNARK, DMG_GENERIC);
FX_Blood(origin + [0,0,16], [1,0,0]);
}
@ -102,7 +102,7 @@ monster_snark::customphysics(void)
void
monster_snark::Death(void)
{
float dmg = Skill_GetValue("snark_dmg_pop");
float dmg = Skill_GetValue("snark_dmg_pop", 5);
Damage_Radius(origin, goalentity, dmg, dmg * 2.5f, TRUE, WEAPON_SNARK);
FX_Blood(origin + [0,0,16], [203,183,15] / 255);
Sound_Play(this, CHAN_VOICE, "weapon_snark.die");

View File

@ -81,7 +81,7 @@ monster_tripmine::Trip(int walkthrough)
Death =
Pain = __NULL__;
takedamage = DAMAGE_NO;
dmg = Skill_GetValue("plr_tripmine");
dmg = Skill_GetValue("plr_tripmine", 150);
FX_Explosion(origin);
Damage_Radius(origin, real_owner, dmg, dmg * 2.5f, TRUE, WEAPON_TRIPMINE);
sound(this, CHAN_WEAPON, sprintf("weapons/explode%d.wav", floor(random() * 2) + 3), 1, ATTN_NORM);

View File

@ -1,3 +1,5 @@
exec platform_default.cfg
// Generic Binds
bind "ESC" "togglemenu"
bind "w" "+forward"
@ -32,60 +34,9 @@ bind "y" "messagemode"
bind "u" "messagemode2"
bind "t" "impulse 201"
bind "f" "impulse 100"
bind "f1" "vote yes"
bind "f2" "vote no"
// Game Variables
seta "hostname" "FreeTF Server"
seta "maxplayers" "8"
// Physics Variables
serverinfo "phy_stepheight" "18"
serverinfo "phy_airstepheight" "18"
serverinfo "phy_friction" "4"
serverinfo "phy_edgefriction" "1"
serverinfo "phy_stopspeed" "75"
serverinfo "phy_gravity" "800"
serverinfo "phy_airaccelerate" "10"
serverinfo "phy_accelerate" "8"
serverinfo "phy_maxspeed" "270"
// 2D/HUD Variables
seta "con_color" "255 150 0"
seta "vgui_color" "255 170 0"
seta "cross_color" "0 255 0"
seta "vid_conautoscale" "1"
seta "con_textsize" "12"
seta "cl_cursor_scale" "1"
seta "vid_conautoscale" "1"
seta "scr_conalpha" "1"
// View Variables
seta "cl_bob" "0"
seta "maxpitch" "89"
seta "minpitch" "-89"
seta "r_meshpitch" "1"
seta "v_bob" "0.01"
seta "v_bobcycle" "0.8"
seta "v_bobup" "0.5"
seta "v_contentblend" "0"
// 3D World Variables
seta "gl_blacklist_debug_glsl" "0"
seta "gl_overbright" "0"
seta "r_fb_models" "0"
seta "r_fullbrightSkins" "0"
seta "r_particledesc" "default"
seta "r_polygonoffset_submodel_factor" "0"
seta "r_polygonoffset_submodel_offset" "0"
seta "r_shadow_realtime_dlight_shadows" "0"
seta "r_shadow_realtime_world_shadows" "0"
// Misc defaults
seta "cfg_save_auto" "1"
seta "cl_idlefps" "60"
seta "cl_maxfps" "250"
seta "com_nogamedirnativecode" "0"
seta "con_logcenterprint" "0"
seta "con_notifylines" "0"
seta "lang" "en_us"
seta "r_imageexensions" "tga bmp pcx"
seta "scr_sshot_type" "tga"

View File

@ -1,4 +1,4 @@
exec skill.cfg
exec platform_default.cfg
// Generic Binds
bind "ESC" "togglemenu"
@ -41,57 +41,7 @@ bind "f2" "vote no"
seta "hostname" "FreeHL Server"
seta "maxplayers" "8"
// Physics Variables
serverinfo "phy_stepheight" "18"
serverinfo "phy_airstepheight" "18"
serverinfo "phy_friction" "4"
serverinfo "phy_edgefriction" "1"
serverinfo "phy_stopspeed" "75"
serverinfo "phy_gravity" "800"
serverinfo "phy_airaccelerate" "10"
serverinfo "phy_accelerate" "8"
serverinfo "phy_maxspeed" "270"
// 2D/HUD Variables
seta "con_color" "255 150 0"
seta "vgui_color" "255 170 0"
seta "cross_color" "0 255 0"
seta "vid_conautoscale" "1"
seta "con_textsize" "12"
seta "cl_cursor_scale" "1"
seta "vid_conautoscale" "1"
seta "scr_conalpha" "1"
// View Variables
seta "cl_bob" "0"
seta "maxpitch" "89"
seta "minpitch" "-89"
seta "r_meshpitch" "1"
seta "v_bob" "0.01"
seta "v_bobcycle" "0.8"
seta "v_bobup" "0.5"
seta "v_contentblend" "0"
// 3D World Variables
seta "gl_blacklist_debug_glsl" "0"
seta "gl_overbright" "0"
seta "r_fb_models" "0"
seta "r_fullbrightSkins" "0"
seta "r_particledesc" "default"
seta "r_polygonoffset_submodel_factor" "0"
seta "r_polygonoffset_submodel_offset" "0"
seta "r_shadow_realtime_dlight_shadows" "0"
seta "r_shadow_realtime_world_shadows" "0"
// Misc defaults
seta "cfg_save_auto" "1"
seta "cl_idlefps" "60"
seta "cl_maxfps" "250"
seta "com_nogamedirnativecode" "0"
seta "con_logcenterprint" "0"
seta "con_notifylines" "0"
seta "lang" "en_us"
seta "r_imageexensions" "tga bmp pcx png jpg"
seta "scr_sshot_type" "tga"
seta "media_repeat "0"
seta net_masterextra1 "master.frag-net.com:27950"