Rebase against Nuclide Develop/

This commit is contained in:
Marco Cawthorne 2024-07-23 19:12:26 -07:00
parent 019e2c531a
commit 802cf3a66a
Signed by: eukara
GPG key ID: CE2032F0A2882A22
18 changed files with 93 additions and 146 deletions

1
PROJECT Normal file
View file

@ -0,0 +1 @@
ScientistHunt

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
* Copyright (c) 2016-2024 Marco Cawthorne <marco@icculus.org>
*
* 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();
}
}

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2023 Marco Cawthorne <marco@icculus.org>
* Copyright (c) 2016-2024 Marco Cawthorne <marco@icculus.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2022 Vera Visions LLC.
* Copyright (c) 2016-2024 Marco Cawthorne <marco@icculus.org>
*
* 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;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
* Copyright (c) 2016-2024 Marco Cawthorne <marco@icculus.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above

View file

@ -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();

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2021 Marco Cawthorne <marco@icculus.org>
* Copyright (c) 2016-2024 Marco Cawthorne <marco@icculus.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
* Copyright (c) 2016-2024 Marco Cawthorne <marco@icculus.org>
*
* 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;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 Marco Cawthorne <marco@icculus.org>
* Copyright (c) 2023-2024 Marco Cawthorne <marco@icculus.org>
*
* 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;

View file

@ -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;
var int autocvar_sh_insanity = 5;

View file

@ -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);
}

View file

@ -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;
}

View file

@ -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");

View file

@ -1,54 +0,0 @@
/*
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
*
* 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)

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2021 Marco Cawthorne <marco@icculus.org>
* Copyright (c) 2016-2024 Marco Cawthorne <marco@icculus.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2023 Marco Cawthorne <marco@icculus.org>
* Copyright (c) 2016-2024 Marco Cawthorne <marco@icculus.org>
* Copyright (c) 2016-2023 Gethyn ThomasQuail <gethyn@vera-visions.com>
*
* 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 */

View file

@ -1,3 +1,19 @@
/*
* Copyright (c) 2016-2024 Marco Cawthorne <marco@icculus.org>
*
* 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,

View file

@ -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