diff --git a/PROJECT b/PROJECT new file mode 100644 index 0000000..08c6ee2 --- /dev/null +++ b/PROJECT @@ -0,0 +1 @@ +ScientistHunt \ No newline at end of file diff --git a/src/client/cmds.qc b/src/client/cmds.qc index 70a5eea..02fd8b8 100644 --- a/src/client/cmds.qc +++ b/src/client/cmds.qc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2020 Marco Cawthorne + * Copyright (c) 2016-2024 Marco Cawthorne * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -19,7 +19,6 @@ void VGUI_ChooseTeam(void); int ClientGame_ConsoleCommand(void) { - switch(argv(0)) { case "+sciscore": if (cvar("sh_announcescinum") == 1) @@ -36,15 +35,18 @@ ClientGame_ConsoleCommand(void) default: return (0); } + return (1); } void CMD_ChooseTeam(void) { - if (serverkeyfloat("sv_playerslots") <= 1) + if (serverkeyfloat("sv_playerslots") <= 1) { return; + } - if (serverkeyfloat("teams") > 1) + if (serverkeyfloat("teams") > 1) { VGUI_ChooseTeam(); + } } \ No newline at end of file diff --git a/src/client/defs.h b/src/client/defs.h index be7c7b5..f70f465 100644 --- a/src/client/defs.h +++ b/src/client/defs.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2023 Marco Cawthorne + * Copyright (c) 2016-2024 Marco Cawthorne * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff --git a/src/client/draw.qc b/src/client/draw.qc index 9c6146a..0a7a00c 100644 --- a/src/client/draw.qc +++ b/src/client/draw.qc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2022 Vera Visions LLC. + * Copyright (c) 2016-2024 Marco Cawthorne * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -12,7 +12,7 @@ * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ + */ var bool g_sciscore = false; diff --git a/src/client/entities.qc b/src/client/entities.qc index 4053ca0..973464e 100644 --- a/src/client/entities.qc +++ b/src/client/entities.qc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2020 Marco Cawthorne + * Copyright (c) 2016-2024 Marco Cawthorne * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff --git a/src/client/hud.qc b/src/client/hud.qc index 0ce1b3a..ca4486e 100644 --- a/src/client/hud.qc +++ b/src/client/hud.qc @@ -309,8 +309,9 @@ HUD_DrawAmmo3(void) void HUD_DrawAmmoBar(vector pos, float val, float max, float a) { - if (val <= 0) + if (val <= 0) { return; + } float perc; perc = val / max; @@ -390,6 +391,7 @@ HUD_DrawLogo(void) frame_timer = 0.1f; f++; + if (f == 31) { f = 0; } @@ -447,8 +449,9 @@ HUD_DrawDamageIndicator(void) { vector cross_pos; - if (pSeatLocal->m_flDamageIndicator <= 0.0) + if (pSeatLocal->m_flDamageIndicator <= 0.0) { return; + } cross_pos = g_hudmins + (g_hudres / 2) + [-12,-12]; @@ -568,8 +571,9 @@ HUD_Draw(void) #endif /* little point in not drawing these, even if you don't have a suit */ - if (pl.m_activeWeapon) + if (pl.m_activeWeapon) { pl.m_activeWeapon.UpdateGUI(); + } HUD_DrawDamageIndicator(); HUD_DrawWeaponSelect(); diff --git a/src/client/init.qc b/src/client/init.qc index 87b6b50..e0ee3af 100644 --- a/src/client/init.qc +++ b/src/client/init.qc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2021 Marco Cawthorne + * Copyright (c) 2016-2024 Marco Cawthorne * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff --git a/src/client/vgui_chooseteam.qc b/src/client/vgui_chooseteam.qc index 7de4438..e26e741 100644 --- a/src/client/vgui_chooseteam.qc +++ b/src/client/vgui_chooseteam.qc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2020 Marco Cawthorne + * Copyright (c) 2016-2024 Marco Cawthorne * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -32,7 +32,6 @@ void TeamButton::OnMouseUp(void) { int tag = GetTag(); - localcmd("changeclass\n"); sendevent("TeamJoin", "f", (float)tag); winChooseTeam.Hide(); @@ -44,8 +43,9 @@ VGUI_ChooseTeam_MapInfo(void) { static string mapinfo = __NULL__; - if (mapinfo != __NULL__) + if (mapinfo != __NULL__) { return mapinfo; + } filestream fileMap = fopen(strcat("maps/", mapname, ".txt"), FILE_READ); string temp; diff --git a/src/client/vgui_motd.qc b/src/client/vgui_motd.qc index 27a2ee5..338a6f0 100644 --- a/src/client/vgui_motd.qc +++ b/src/client/vgui_motd.qc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Marco Cawthorne + * Copyright (c) 2023-2024 Marco Cawthorne * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -30,8 +30,9 @@ VGUI_ShowMOTD(void) winMotd.Hide(); } - if (MOTD_GetLineCount() < 1i) + if (MOTD_GetLineCount() < 1i) { return; + } if (!initialized) { initialized = TRUE; diff --git a/src/server/gamerules.h b/src/server/gamerules.h index fac1be4..2521b1d 100644 --- a/src/server/gamerules.h +++ b/src/server/gamerules.h @@ -170,7 +170,4 @@ var int autocvar_sh_announcescideath = 1; var int autocvar_sh_announcescinum = 1; /* default kills required for insanity */ -var int autocvar_sh_insanity = 5; - -/* an override for sh_scimax */ -var int autocvarsh_scimax_override = 0; \ No newline at end of file +var int autocvar_sh_insanity = 5; \ No newline at end of file diff --git a/src/server/gamerules.qc b/src/server/gamerules.qc index 848d0c2..421a450 100644 --- a/src/server/gamerules.qc +++ b/src/server/gamerules.qc @@ -399,8 +399,6 @@ HLGameRules::PlayerSpawn(NSClientPlayer pp) pl.SetOrigin(spot.origin); pl.SetAngles(spot.angles); - Client_FixAngle(pl, pl.angles); - pl.GiveItem("item_suit"); SHData_GetItems(pl); } diff --git a/src/server/monster_scientist.qc b/src/server/monster_scientist.qc index 050617a..58b2f1b 100644 --- a/src/server/monster_scientist.qc +++ b/src/server/monster_scientist.qc @@ -339,6 +339,8 @@ SHScientist::PlayerUse(void) void SHScientist::Pain(entity inflictor, entity attacker, int damage, vector dir, int location) { + super::Pain(inflictor, attacker, damage, dir, location); + /* make everyone on edge */ WarnAllies(); @@ -369,7 +371,7 @@ SHScientist::Death(entity inflictor, entity attacker, int damage, vector dir, in rules.ScientistKill((SHPlayer)attacker, (entity)this); Plugin_PlayerObituary(attacker, this, g_dmg_iWeapon, g_dmg_iHitBody, g_dmg_iDamage); - Sound_Speak(this, "SHScientist.die"); + Sound_Speak(this, "monster_scientist.die"); deathcheck = true; } diff --git a/src/server/server.qc b/src/server/server.qc index f32d15c..d7cabe8 100644 --- a/src/server/server.qc +++ b/src/server/server.qc @@ -51,6 +51,7 @@ Game_Worldspawn(void) Sound_Precache("Player.FlashLightOff"); Sound_Precache("Player.FlashLightOn"); + EntityDef_Precache("monster_scientist"); EntityDef_Precache("weapon_crowbar"); EntityDef_Precache("weapon_9mmhandgun"); EntityDef_Precache("weapon_357"); diff --git a/src/shared/items.h b/src/shared/items.h deleted file mode 100644 index c55c069..0000000 --- a/src/shared/items.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2016-2020 Marco Cawthorne - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER - * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#define ITEM_CROWBAR 0x00000001 -#define ITEM_GLOCK 0x00000002 -#define ITEM_PYTHON 0x00000004 -#define ITEM_MP5 0x00000008 -#define ITEM_CROSSBOW 0x00000010 -#define ITEM_SHOTGUN 0x00000020 -#define ITEM_RPG 0x00000040 -#define ITEM_GAUSS 0x00000080 - -#define ITEM_EGON 0x00000100 -#define ITEM_HORNETGUN 0x00000200 -#define ITEM_HANDGRENADE 0x00000400 -#define ITEM_TRIPMINE 0x00000800 -#define ITEM_SATCHEL 0x00001000 -#define ITEM_SNARK 0x00002000 -#define ITEM_SUIT 0x00004000 -#define ITEM_LONGJUMP 0x00008000 - -#define ITEM_HEALTHKIT 0x00010000 -#define ITEM_BATTERY 0x00020000 -#define ITEM_CANNON 0x00040000 -#define ITEM_CHAINSAW 0x00080000 -#define ITEM_HAMMER 0x00100000 -#define ITEM_NEEDLE 0x00200000 -#define ITEM_UNUSED23 0x00400000 -#define ITEM_UNUSED24 0x00800000 - -#define ITEM_UNUSED25 0x01000000 -#define ITEM_UNUSED26 0x02000000 -#define ITEM_UNUSED27 0x04000000 -#define ITEM_UNUSED28 0x08000000 -#define ITEM_UNUSED29 0x10000000 -#define ITEM_UNUSED30 0x20000000 -#define ITEM_UNUSED31 0x40000000 -#define ITEM_UNUSED32 0x80000000 - -/* part of .gflags */ -#define GF_MADNESS (1<<23) diff --git a/src/shared/player.qc b/src/shared/player.qc index 54378b5..f64c37d 100644 --- a/src/shared/player.qc +++ b/src/shared/player.qc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2021 Marco Cawthorne + * Copyright (c) 2016-2024 Marco Cawthorne * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff --git a/src/shared/pmove.qc b/src/shared/pmove.qc index 03e494e..1bfc335 100644 --- a/src/shared/pmove.qc +++ b/src/shared/pmove.qc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2023 Marco Cawthorne + * Copyright (c) 2016-2024 Marco Cawthorne * Copyright (c) 2016-2023 Gethyn ThomasQuail * * Permission to use, copy, modify, and distribute this software for any @@ -15,21 +15,7 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define PMOVE_AIRSTEPHEIGHT 0 -#define PMOVE_STEPHEIGHT 18 -#define PMOVE_FRICTION 4 -#define PMOVE_EDGEFRICTION 1 -#define PMOVE_STOPSPEED 100 -#define PMOVE_GRAVITY 800 -#define PMOVE_AIRACCELERATE 10 -#define PMOVE_WATERACCELERATE 10 -#define PMOVE_ACCELERATE 10 -#define PMOVE_MAXSPEED 270 -#define PMOVE_STEP_WALKSPEED 135 -#define PMOVE_STEP_RUNSPEED 220 -#define PHY_VIEWPOS [0,0,28] -#define PHY_VIEWPOS_CROUCHED [0,0,12] -#include "items.h" +#define GF_MADNESS (1<<23) /* insanity changes player move and attack speed * so lets override some base player functions */ diff --git a/src/shared/scianims.h b/src/shared/scianims.h index 28be4cd..c381d1a 100644 --- a/src/shared/scianims.h +++ b/src/shared/scianims.h @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2016-2024 Marco Cawthorne + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER + * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + typedef enum { SCIANIM_WALK = 0, SCIANIM_WALK_SCARED = 1, diff --git a/zpak001.pk3dir/default.cfg b/zpak001.pk3dir/default.cfg index 204781a..2655a12 100644 --- a/zpak001.pk3dir/default.cfg +++ b/zpak001.pk3dir/default.cfg @@ -1,40 +1,48 @@ -// Generic Binds -bind "ESC" "togglemenu" -bind "w" "+forward" -bind "s" "+back" -bind "a" "+moveleft" -bind "d" "+moveright" -bind "SPACE" "+jump" -bind "CTRL" "+duck" -bind "SHIFT" "+speed" -bind "0" "slot10" -bind "1" "slot1" -bind "2" "slot2" -bind "3" "slot3" -bind "4" "slot4" -bind "5" "slot5" -bind "6" "slot6" -bind "7" "slot7" -bind "8" "slot8" -bind "9" "slot9" -bind "UPARROW" "+forward" -bind "DOWNARROW" "+back" -bind "LEFTARROW" "+left" -bind "RIGHTARROW" "+right" -bind "MOUSE1" "+attack" -bind "MOUSE2" "+attack2" -bind "MWHEELDOWN" "invnext" -bind "MWHEELUP" "invprev" -bind "r" "+reload" -bind "e" "+use" -bind "TAB" "+showscores" -bind "y" "messagemode" -bind "u" "messagemode2" -bind "t" "impulse 201" -bind "f" "impulse 100" -bind "f1" "vote yes" -bind "f2" "vote no" +unbindall +bind CTRL "+duck" +bind DOWNARROW "+back" +bind ESCAPE "togglemenu" +bind F1 "vote yes" +bind F2 "vote no" +bind LEFTARROW "+left" +bind MOUSE1 "+attack" +bind MOUSE2 "+attack2" +bind MWHEELDOWN "weapnext" +bind MWHEELUP "weapprev" +bind RIGHTARROW "+right" +bind SHIFT "+speed" +bind SPACE "+jump" +bind TAB "+showscores" +bind UPARROW "+forward" +bind 0 "slot10" +bind 1 "slot1" +bind 2 "slot2" +bind 3 "slot3" +bind 4 "slot4" +bind 5 "slot5" +bind 6 "slot6" +bind 7 "slot7" +bind 8 "slot8" +bind 9 "slot9" +bind ` "toggleconsole" +bind a "+moveleft" +bind d "+moveright" +bind e "+use" +bind f "impulse 100" +bind r "+reload" +bind s "+back" +bind t "impulse 201" +bind u "messagemode2" +bind w "+forward" +bind y "messagemode" +bind q "weaplast" +bind ~ "toggleconsole" + +// load game defaults +exec cvar_defaults.cfg +// our mod overrides below + // Game Variables seta "hostname" "FreeSH Server" seta "maxplayers" "8" @@ -43,18 +51,3 @@ seta "maxplayers" "8" seta "con_color" "255 255 215" seta "vgui_color" "255 255 215" seta "cross_color" "0 255 0" - -// disable some nuclide niceties -seta v_muzzledlight 0 - -// config compat -alias mp_timelimit timelimit -alias mp_fraglimit fraglimit -alias sv_gamemode sh_realistic - -// video settings -seta gl_overbright 0 -seta gl_ldr 1 -seta r_lightmap_format rgb8 - -exec skill_scihunt.cfg \ No newline at end of file