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 * Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above * purpose with or without fee is hereby granted, provided that the above
@ -19,7 +19,6 @@ void VGUI_ChooseTeam(void);
int int
ClientGame_ConsoleCommand(void) ClientGame_ConsoleCommand(void)
{ {
switch(argv(0)) { switch(argv(0)) {
case "+sciscore": case "+sciscore":
if (cvar("sh_announcescinum") == 1) if (cvar("sh_announcescinum") == 1)
@ -36,15 +35,18 @@ ClientGame_ConsoleCommand(void)
default: default:
return (0); return (0);
} }
return (1); return (1);
} }
void void
CMD_ChooseTeam(void) CMD_ChooseTeam(void)
{ {
if (serverkeyfloat("sv_playerslots") <= 1) if (serverkeyfloat("sv_playerslots") <= 1) {
return; return;
}
if (serverkeyfloat("teams") > 1) if (serverkeyfloat("teams") > 1) {
VGUI_ChooseTeam(); 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 * Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above * 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 * Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above * 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 * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
var bool g_sciscore = false; 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 * Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above * purpose with or without fee is hereby granted, provided that the above

View file

@ -309,8 +309,9 @@ HUD_DrawAmmo3(void)
void void
HUD_DrawAmmoBar(vector pos, float val, float max, float a) HUD_DrawAmmoBar(vector pos, float val, float max, float a)
{ {
if (val <= 0) if (val <= 0) {
return; return;
}
float perc; float perc;
perc = val / max; perc = val / max;
@ -390,6 +391,7 @@ HUD_DrawLogo(void)
frame_timer = 0.1f; frame_timer = 0.1f;
f++; f++;
if (f == 31) { if (f == 31) {
f = 0; f = 0;
} }
@ -447,8 +449,9 @@ HUD_DrawDamageIndicator(void)
{ {
vector cross_pos; vector cross_pos;
if (pSeatLocal->m_flDamageIndicator <= 0.0) if (pSeatLocal->m_flDamageIndicator <= 0.0) {
return; return;
}
cross_pos = g_hudmins + (g_hudres / 2) + [-12,-12]; cross_pos = g_hudmins + (g_hudres / 2) + [-12,-12];
@ -568,8 +571,9 @@ HUD_Draw(void)
#endif #endif
/* little point in not drawing these, even if you don't have a suit */ /* 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(); pl.m_activeWeapon.UpdateGUI();
}
HUD_DrawDamageIndicator(); HUD_DrawDamageIndicator();
HUD_DrawWeaponSelect(); 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 * Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above * 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 * Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above * purpose with or without fee is hereby granted, provided that the above
@ -32,7 +32,6 @@ void
TeamButton::OnMouseUp(void) TeamButton::OnMouseUp(void)
{ {
int tag = GetTag(); int tag = GetTag();
localcmd("changeclass\n"); localcmd("changeclass\n");
sendevent("TeamJoin", "f", (float)tag); sendevent("TeamJoin", "f", (float)tag);
winChooseTeam.Hide(); winChooseTeam.Hide();
@ -44,8 +43,9 @@ VGUI_ChooseTeam_MapInfo(void)
{ {
static string mapinfo = __NULL__; static string mapinfo = __NULL__;
if (mapinfo != __NULL__) if (mapinfo != __NULL__) {
return mapinfo; return mapinfo;
}
filestream fileMap = fopen(strcat("maps/", mapname, ".txt"), FILE_READ); filestream fileMap = fopen(strcat("maps/", mapname, ".txt"), FILE_READ);
string temp; 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 * Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above * purpose with or without fee is hereby granted, provided that the above
@ -30,8 +30,9 @@ VGUI_ShowMOTD(void)
winMotd.Hide(); winMotd.Hide();
} }
if (MOTD_GetLineCount() < 1i) if (MOTD_GetLineCount() < 1i) {
return; return;
}
if (!initialized) { if (!initialized) {
initialized = TRUE; initialized = TRUE;

View file

@ -171,6 +171,3 @@ var int autocvar_sh_announcescinum = 1;
/* default kills required for insanity */ /* default kills required for insanity */
var int autocvar_sh_insanity = 5; var int autocvar_sh_insanity = 5;
/* an override for sh_scimax */
var int autocvarsh_scimax_override = 0;

View file

@ -399,8 +399,6 @@ HLGameRules::PlayerSpawn(NSClientPlayer pp)
pl.SetOrigin(spot.origin); pl.SetOrigin(spot.origin);
pl.SetAngles(spot.angles); pl.SetAngles(spot.angles);
Client_FixAngle(pl, pl.angles);
pl.GiveItem("item_suit"); pl.GiveItem("item_suit");
SHData_GetItems(pl); SHData_GetItems(pl);
} }

View file

@ -339,6 +339,8 @@ SHScientist::PlayerUse(void)
void void
SHScientist::Pain(entity inflictor, entity attacker, int damage, vector dir, int location) SHScientist::Pain(entity inflictor, entity attacker, int damage, vector dir, int location)
{ {
super::Pain(inflictor, attacker, damage, dir, location);
/* make everyone on edge */ /* make everyone on edge */
WarnAllies(); WarnAllies();
@ -369,7 +371,7 @@ SHScientist::Death(entity inflictor, entity attacker, int damage, vector dir, in
rules.ScientistKill((SHPlayer)attacker, (entity)this); rules.ScientistKill((SHPlayer)attacker, (entity)this);
Plugin_PlayerObituary(attacker, this, g_dmg_iWeapon, g_dmg_iHitBody, g_dmg_iDamage); 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; deathcheck = true;
} }

View file

@ -51,6 +51,7 @@ Game_Worldspawn(void)
Sound_Precache("Player.FlashLightOff"); Sound_Precache("Player.FlashLightOff");
Sound_Precache("Player.FlashLightOn"); Sound_Precache("Player.FlashLightOn");
EntityDef_Precache("monster_scientist");
EntityDef_Precache("weapon_crowbar"); EntityDef_Precache("weapon_crowbar");
EntityDef_Precache("weapon_9mmhandgun"); EntityDef_Precache("weapon_9mmhandgun");
EntityDef_Precache("weapon_357"); 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 * Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above * 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> * Copyright (c) 2016-2023 Gethyn ThomasQuail <gethyn@vera-visions.com>
* *
* Permission to use, copy, modify, and distribute this software for any * 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. * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
#define PMOVE_AIRSTEPHEIGHT 0 #define GF_MADNESS (1<<23)
#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"
/* insanity changes player move and attack speed /* insanity changes player move and attack speed
* so lets override some base player functions */ * 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 { typedef enum {
SCIANIM_WALK = 0, SCIANIM_WALK = 0,
SCIANIM_WALK_SCARED = 1, SCIANIM_WALK_SCARED = 1,

View file

@ -1,39 +1,47 @@
// Generic Binds unbindall
bind "ESC" "togglemenu" bind CTRL "+duck"
bind "w" "+forward" bind DOWNARROW "+back"
bind "s" "+back" bind ESCAPE "togglemenu"
bind "a" "+moveleft" bind F1 "vote yes"
bind "d" "+moveright" bind F2 "vote no"
bind "SPACE" "+jump" bind LEFTARROW "+left"
bind "CTRL" "+duck" bind MOUSE1 "+attack"
bind "SHIFT" "+speed" bind MOUSE2 "+attack2"
bind "0" "slot10" bind MWHEELDOWN "weapnext"
bind "1" "slot1" bind MWHEELUP "weapprev"
bind "2" "slot2" bind RIGHTARROW "+right"
bind "3" "slot3" bind SHIFT "+speed"
bind "4" "slot4" bind SPACE "+jump"
bind "5" "slot5" bind TAB "+showscores"
bind "6" "slot6" bind UPARROW "+forward"
bind "7" "slot7" bind 0 "slot10"
bind "8" "slot8" bind 1 "slot1"
bind "9" "slot9" bind 2 "slot2"
bind "UPARROW" "+forward" bind 3 "slot3"
bind "DOWNARROW" "+back" bind 4 "slot4"
bind "LEFTARROW" "+left" bind 5 "slot5"
bind "RIGHTARROW" "+right" bind 6 "slot6"
bind "MOUSE1" "+attack" bind 7 "slot7"
bind "MOUSE2" "+attack2" bind 8 "slot8"
bind "MWHEELDOWN" "invnext" bind 9 "slot9"
bind "MWHEELUP" "invprev" bind ` "toggleconsole"
bind "r" "+reload" bind a "+moveleft"
bind "e" "+use" bind d "+moveright"
bind "TAB" "+showscores" bind e "+use"
bind "y" "messagemode" bind f "impulse 100"
bind "u" "messagemode2" bind r "+reload"
bind "t" "impulse 201" bind s "+back"
bind "f" "impulse 100" bind t "impulse 201"
bind "f1" "vote yes" bind u "messagemode2"
bind "f2" "vote no" bind w "+forward"
bind y "messagemode"
bind q "weaplast"
bind ~ "toggleconsole"
// load game defaults
exec cvar_defaults.cfg
// our mod overrides below
// Game Variables // Game Variables
seta "hostname" "FreeSH Server" seta "hostname" "FreeSH Server"
@ -43,18 +51,3 @@ seta "maxplayers" "8"
seta "con_color" "255 255 215" seta "con_color" "255 255 215"
seta "vgui_color" "255 255 215" seta "vgui_color" "255 255 215"
seta "cross_color" "0 255 0" 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