Push more misc files.

This commit is contained in:
Marco Cawthorne 2024-09-01 03:02:04 -07:00
parent cad6ba6fec
commit 1f55c43bf3
23 changed files with 741 additions and 12 deletions

1
PROJECT Normal file
View file

@ -0,0 +1 @@
RadTherapy2

View file

@ -1,5 +1,7 @@
CC=fteqcc
QCC=fteqcc
all:
cd client && $(MAKE)
cd server && $(MAKE)
cd ../zpak001.pk3dir/maps/ && $(QCC) singleplayer.qc
cd ../zpak001.pk3dir/maps/mp/gametypes && $(QCC) dm.qc

View file

@ -1,2 +1,75 @@
/*
* Copyright (c) 2016-2021 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.
*/
#include "../shared/defs.h"
#include "../../../valve/src/client/obituary.h"
#include "../../../valve/src/client/particles.h"
#include "../../../valve/src/client/hud_sprite.h"
#include "../../../valve/src/client/HLWeaponSelect.h"
var int autocvar_cl_autoweaponswitch = TRUE;
vector g_hud_color;
vector g_hudmins;
vector g_hudres;
var string g_hud1_spr;
var string g_hud2_spr;
var string g_hud3_spr;
var string g_hud4_spr;
var string g_hud5_spr;
var string g_hud6_spr;
var string g_hud7_spr;
var string g_cross_spr;
var string g_laser_spr;
/* muzzleflash indices */
var int MUZZLE_SMALL;
var int MUZZLE_RIFLE;
var int MUZZLE_WEIRD;
struct
{
/* hud.c */
int m_iHealthOld;
float m_flHealthAlpha;
int m_iArmorOld;
float m_flArmorAlpha;
int m_iAmmo1Old;
float m_flAmmo1Alpha;
int m_iAmmo2Old;
float m_flAmmo2Alpha;
int m_iAmmo3Old;
float m_flAmmo3Alpha;
int m_iPickupWeapon;
float m_flPickupAlpha;
int m_iHUDWeaponSelected;
float m_flHUDWeaponSelectTime;
int m_iItemsOld;
float m_flDamageIndicator;
float m_flTitleAlpha;
HLWeaponSelect weaponSelectionHUD;
} g_seatslocal[4], *pSeatLocal;
void HUD_DrawAmmo1(void);
void HUD_DrawAmmo2(void);
void HUD_DrawAmmo3(void);
void HUD_DrawAmmoBar(vector pos, float val, float max, float a);
void HUD_WeaponPickupNotify(int);
font_s FONT_HUD_CROSS;

View file

@ -11,7 +11,6 @@
../../../src/shared/fteextensions.qc
../../../src/shared/defs.h
../../../src/client/defs.h
../../../valve/src/client/defs.h
../../../hl2/src/client/defs.h
../../../src/vgui/include.src
../../../src/gs-entbase/client.src

View file

@ -14,6 +14,7 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "../shared/defs.h"
#include "../../../valve/src/server/gamerules.h"
#include "../../../valve/src/server/items.h"
#include "../../../valve/src/server/flashlight.h"

104
src/server/item_battery.qc Normal file
View file

@ -0,0 +1,104 @@
/*
* 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.
*/
/*QUAKED item_battery (0 0 0.8) (-16 -16 0) (16 16 36)
HALF-LIFE (1998) ENTITY
HEV Suit energy battery.
It adds the following energy values to the HEV Suit by default:
Skill 1 (Easy): 15
Skill 2 (Medium): 15
Skill 3 (Hard): 10
The values can be tweaked in the skill.cfg file.
-------- MODEL FOR RADIANT ONLY - DO NOT SET THIS AS A KEY --------
model="models/w_battery.mdl"
*/
class item_battery:NSRenderableEntity
{
void(void) item_battery;
virtual void(void) Spawned;
virtual void(void) Respawn;
virtual void(entity) Touch;
};
void item_battery::Touch(entity eToucher)
{
if (eToucher.classname != "player") {
return;
}
NSClientPlayer pl = (NSClientPlayer)eToucher;
/* don't pick up if we don't have a suit */
if (!(pl.g_items & ITEM_SUIT))
return;
/* maxxed out */
if (pl.armor >= 100) {
return;
}
/* Move this somewhere else? */
pl.armor += Skill_GetValue("battery", 15);
if (pl.armor > 100) {
pl.armor = 100;
}
Logging_Pickup(eToucher, this, __NULL__);
Sound_Play(eToucher, CHAN_ITEM, "item.battery");
if (real_owner || cvar("sv_playerslots") == 1) {
Destroy();
} else {
Disappear();
ScheduleThink(Respawn, 30.0f);
}
}
void item_battery::Respawn(void)
{
SetSolid(SOLID_TRIGGER);
SetMovetype(MOVETYPE_TOSS);
SetOrigin(GetSpawnOrigin());
SetModel(GetSpawnModel());
SetSize([-16,-16,0],[16,16,16]);
botinfo = BOTINFO_ARMOR;
ReleaseThink();
if (!real_owner && time > 30.0f)
Sound_Play(this, CHAN_ITEM, "item.respawn");
DropToFloor();
}
void
item_battery::Spawned(void)
{
super::Spawned();
Sound_Precache("item.battery");
Sound_Precache("item.respawn");
}
void item_battery::item_battery(void)
{
model = "models/items/battery.mdl";
}

View file

@ -0,0 +1,87 @@
/*
* 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.
*/
/*QUAKED item_healthkit (0 0 0.8) (-16 -16 0) (16 16 36)
HALF-LIFE (1998) ENTITY
Healthkit item.
Adds 20 of health to the player.
-------- MODEL FOR RADIANT ONLY - DO NOT SET THIS AS A KEY --------
model="models/w_medkit.mdl"
*/
class item_healthkit:NSRenderableEntity
{
void(void) item_healthkit;
virtual void(void) Spawned;
virtual void(void) Respawn;
virtual void(entity) Touch;
};
void item_healthkit::Touch(entity eToucher)
{
if (eToucher.classname != "player") {
return;
}
if (eToucher.health >= eToucher.max_health) {
return;
}
Damage_Apply(eToucher, this, -20, 0, DMG_GENERIC);
Sound_Play(this, CHAN_ITEM, "item.healthkit");
Logging_Pickup(eToucher, this, __NULL__);
if (real_owner || cvar("sv_playerslots") == 1) {
Destroy();
} else {
Disappear();
ScheduleThink(Respawn, 30.0f);
}
}
void item_healthkit::Respawn(void)
{
SetSolid(SOLID_TRIGGER);
SetMovetype(MOVETYPE_TOSS);
SetOrigin(GetSpawnOrigin());
SetModel(GetSpawnModel());
SetSize([-16,-16,0],[16,16,16]);
botinfo = BOTINFO_HEALTH;
ReleaseThink();
if (!real_owner && time > 30.0f)
Sound_Play(this, CHAN_ITEM, "item.respawn");
DropToFloor();
}
void
item_healthkit::Spawned(void)
{
super::Spawned();
Sound_Precache("item.healthkit");
Sound_Precache("item.respawn");
}
void item_healthkit::item_healthkit(void)
{
model = "models/items/healthkit.mdl";
}

127
src/server/item_suit.qc Normal file
View file

@ -0,0 +1,127 @@
/*
* 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.
*/
/*QUAKED item_suit (0 0 0.8) (-16 -16 0) (16 16 36) SUIT_LONGINTRO
HALF-LIFE (1998) ENTITY
HEV Suit
Provides the player with armor, a flashlight and a Heads-Up-Display.
When SUIT_LONGINTRO is set, the intro dialog will be longer.
*/
class item_suit:NSRenderableEntity
{
string m_strOnPlayerTouch;
void(void) item_suit;
virtual void(void) Spawned;
virtual void(entity) Touch;
virtual void(void) Respawn;
virtual void(string, string) SpawnKey;
};
void
item_suit::Touch(entity eToucher)
{
if (other.classname != "player") {
return;
}
player pl = (player)other;
if (pl.g_items & ITEM_SUIT) {
return;
}
Logging_Pickup(other, this, __NULL__);
sound(other, CHAN_ITEM, "fvox/bell.wav", 1, ATTN_NORM);
sound(other, CHAN_VOICE, "fvox/hev_logon.wav", 1, ATTN_NORM);
pl.g_items |= ITEM_SUIT;
m_iValue = TRUE;
if (!target) {
UseOutput(other, m_strOnPlayerTouch);
} else {
UseTargets(other, TRIG_TOGGLE, m_flDelay);
}
if (real_owner || cvar("sv_playerslots") == 1) {
Destroy();
} else {
Disappear();
ScheduleThink(Respawn, 30.0f);
}
}
void
item_suit::Respawn(void)
{
if (cvar_string("fs_game") == "bshift") {
Destroy();
return;
}
SetSolid(SOLID_TRIGGER);
SetMovetype(MOVETYPE_TOSS);
SetOrigin(GetSpawnOrigin());
SetModel(GetSpawnModel());
SetSize(VEC_HULL_MIN + [0,0,36], VEC_HULL_MAX + [0,0,36]);
m_iValue = FALSE;
ReleaseThink();
if (!real_owner && time > 30.0f)
Sound_Play(this, CHAN_ITEM, "item.respawn");
DropToFloor();
}
void
item_suit::SpawnKey(string strKey, string strValue)
{
switch (strKey) {
case "OnPlayerTouch":
strValue = strreplace(",", ",_", strValue);
m_strOnPlayerTouch = strcat(m_strOnPlayerTouch, ",_", strValue);
break;
default:
super::SpawnKey(strKey, strValue);
break;
}
}
void
item_suit::Spawned(void)
{
super::Spawned();
precache_sound("items/suitchargeok1.wav");
precache_sound("fvox/hev_logon.wav");
precache_sound("fvox/bell.wav");
Sound_Precache("item.respawn");
if (m_strOnPlayerTouch)
m_strOnPlayerTouch = CreateOutput(m_strOnPlayerTouch);
}
void
item_suit::item_suit(void)
{
model = "models/items/hevsuit.mdl";
}

View file

@ -15,7 +15,7 @@
../../../src/botlib/botinfo.h
../../../src/gs-entbase/server.src
../../../src/gs-entbase/shared.src
../../../valve/src/server/defs.h
../../../hl2/src/server/defs.h
../shared/include.src
../../../valve/src/server/player.qc
../../../valve/src/server/HLScientist.qc

63
src/shared/HL2Weapon.h Normal file
View file

@ -0,0 +1,63 @@
/*
* Copyright (c) 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.
*/
/*! \brief Half-Life weapon base class. */
/*!QUAKED HLWeapon (0 0.8 0.8) (-16 -16 0) (16 16 72)
# OVERVIEW
Half-Life specific weapon based on NSWeapon.
# NEW KEYS
- "ammoIcon" - Which sprites/ image to use. See notes.
- "crosshair" - Which sprites/ image to use as a crosshair. See notes.
- "hudSlot" - In which weapon selection slot this weapon belongs to.
- "hudSlotPos" - The position of the weapon in the respective weapon selection slot.
# NOTES
Both `ammoIcon` and `crosshair` refer to sprite declarations inside the sprites/ directory. FreeHL scans the `sprites/hud.txt` file and and weapon specific files.
Since the weapon specific files only contain short names like `ammo` and `crosshair` you have to refer to them with a prefix separated by a `.` period symbol.
For example, `ammoIcon` being set to `weapon_foobar.ammo` will look up `ammo` inside `sprites/weapon_foobar.txt`.
*/
class
HLWeapon:NSWeapon
{
public:
void HLWeapon(void);
virtual void AddedToInventory(void);
#ifdef SERVER
virtual void SpawnKey(string, string);
#endif
#ifdef CLIENT
virtual void UpdateGUI(void);
nonvirtual void DrawLaser(void);
#endif
private:
#ifdef CLIENT
int m_iHudSlot;
int m_iHudSlotPos;
string m_ammoIcon;
string m_ammo2Icon;
string m_crossHair;
string m_icon;
string m_iconSel;
NSWeapon m_nextWeapon;
#endif
bool m_bAltModeLaser;
};

192
src/shared/HL2Weapon.qc Normal file
View file

@ -0,0 +1,192 @@
/*
* Copyright (c) 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.
*/
void
HLWeapon::HLWeapon(void)
{
#ifdef CLIENT
m_iHudSlot = 0i;
m_iHudSlotPos = 0i;
m_ammoIcon = __NULL__;
m_ammo2Icon = __NULL__;
m_crossHair = __NULL__;
m_nextWeapon = __NULL__;
#endif
m_bAltModeLaser = false;
}
#ifdef SERVER
void
HLWeapon::SpawnKey(string keyName, string setValue)
{
switch (keyName) {
default:
super::SpawnKey(keyName, setValue);
}
}
#endif
void
HLWeapon::AddedToInventory(void)
{
super::AddedToInventory();
#ifdef CLIENT
m_ammoIcon = GetDefString("ammoIcon");
if (m_ammoIcon == "") {
m_ammoIcon = sprintf("%s.ammo", strtolower(classname));
}
m_ammo2Icon = GetDefString("ammoIcon");
if (m_ammo2Icon == "") {
m_ammo2Icon = sprintf("%s.ammo2", strtolower(classname));
}
m_crossHair = GetDefString("crosshair");
if (m_crossHair == "") {
m_crossHair = sprintf("%s.crosshair", strtolower(classname));
}
m_icon = GetDefString("icon");
if (m_icon == "") {
m_icon = sprintf("%s.weapon", strtolower(classname));
}
m_iconSel = GetDefString("iconSelected");
if (m_iconSel == "") {
m_iconSel = sprintf("%s.weapon_s", strtolower(classname));
}
if (m_ammoIcon == "none") {
m_ammoIcon = __NULL__;
}
if (m_ammo2Icon == "none") {
m_ammo2Icon = __NULL__;
}
if (m_crossHair == "none") {
m_crossHair = __NULL__;
}
if (m_icon == "none") {
m_icon = __NULL__;
}
if (m_iconSel == "none") {
m_iconSel = __NULL__;
}
m_iHudSlot = GetDefInt("hudSlot");
m_iHudSlotPos = GetDefInt("hudSlotPos");
#endif
m_bAltModeLaser = GetDefBool("laser");
}
#ifdef CLIENT
void
HLWeapon::UpdateGUI(void)
{
NSClientPlayer ourOwner = __NULL__;
vector ammoPos;
/* draw crosshair */
//HLSprite_DrawCrosshair(m_crossHair);
if (m_bAltModeLaser) {
DrawLaser();
}
#if 1
vector vSize = [540,16];
vector vMainPos;
float progress;
progress = (m_flOverheating / m_fiOverheatLength);
if (progress > 1.0) {
progress = 1.0f;
}
if (m_fiOverheatLength && progress > 0) {
vMainPos = g_hudmins;
vMainPos[0] += (g_hudres[0] / 2) - (vSize[0] / 2);
vMainPos[1] += (g_hudres[1] / 2) - (vSize[1] / 2);
vector vBar = vSize;
vBar[0] = 538 * progress;
vBar[1] = 14;
drawfill(vMainPos + [1,1], vBar, g_hud_color, 1.0, DRAWFLAG_ADDITIVE);
drawfill(vMainPos, [vSize[0], 1], g_hud_color, 1.0f); // Top
drawfill([vMainPos[0], vMainPos[1] + vSize[1]], [vSize[0], 1], g_hud_color, 1.0f); // Bottom
drawfill(vMainPos, [1, vSize[1]], g_hud_color, 1.0f); // Left
drawfill([vMainPos[0] + vSize[0], vMainPos[1]], [1, vSize[1] + 1], g_hud_color, 1.0f); // Right
}
#endif
if (m_bAmmoRequired == false)
return;
ourOwner = (NSClientPlayer)GetOwner();
if (m_iClipSize > 0i) {
ourOwner.a_ammo1 = m_iClip;
HUD_DrawAmmo1();
}
ourOwner.a_ammo2 = ourOwner.GetReserveAmmo(m_primaryAmmoType);
HUD_DrawAmmo2();
if (m_secondaryAmmoType && m_primaryAmmoType != m_secondaryAmmoType) {
ourOwner.a_ammo3 = ourOwner.GetReserveAmmo(m_secondaryAmmoType);
HUD_DrawAmmo3();
}
}
void
HLWeapon::DrawLaser(void)
{
NSClientPlayer ourOwner = (NSClientPlayer)GetOwner();
float lerpValue;
vector laser_pos = g_vec_null;
vector jitter = [0.0f, 0.0f, 0.0f];
vector src = ourOwner.GetEyePos();
traceline(src, src + (anglesToForward(ourOwner.v_angle) * 256), FALSE, ourOwner);
lerpValue = lerp(18,6, trace_fraction);
jitter[0] = (random(0,2) - 2) * (1 - trace_fraction);
jitter[1] = (random(0,2) - 2) * (1 - trace_fraction);
laser_pos = g_hudmins + (g_hudres / 2) + ([-lerpValue,-lerpValue] / 2);
drawsubpic(
laser_pos + jitter,
[lerpValue,lerpValue],
"materials/Sprites/redglow1",
[0,0],
[1.0, 1.0],
[1,1,1],
1.0f,
DRAWFLAG_ADDITIVE
);
}
#endif

1
src/shared/defs.h Normal file
View file

@ -0,0 +1 @@
#include "HL2Weapon.h"

View file

@ -9,6 +9,6 @@
../../../valve/src/shared/fx_gaussbeam.qc
../../../valve/src/shared/fx_corpse.qc
../../../valve/src/shared/HLGaussBeam.qc
../../../valve/src/shared/HLWeapon.qc
../../../hl2/src/shared/HL2Weapon.qc
../../../valve/src/shared/w_tripmine.qc
#endlist

47
src/shared/pmove.qc Normal file
View file

@ -0,0 +1,47 @@
/*
* 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 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 320
#define PMOVE_STEP_WALKSPEED 190
#define PMOVE_STEP_RUNSPEED 320
#define PHY_VIEWPOS [0,0,28]
#define PHY_VIEWPOS_CROUCHED [0,0,12]
void
player::Physics_Jump(void)
{
if (waterlevel >= 2) {
if (watertype == CONTENT_WATER) {
velocity[2] = 100;
} else if (watertype == CONTENT_SLIME) {
velocity[2] = 80;
} else {
velocity[2] = 50;
}
} else {
if (flags & FL_ONGROUND)
velocity[2] += 265;
}
}

View file

@ -0,0 +1,13 @@
#ifdef SERVER
class prop_vehicle_jeep:prop_vehicle_driveable
{
void(void) prop_vehicle_jeep;
};
void
prop_vehicle_jeep::prop_vehicle_jeep(void)
{
m_vecSeatOffest = [0,0,0];
model = "models/buggy.mdl";
}
#endif

View file

@ -23,6 +23,10 @@ set bot_sidespeed "152" // Bots desired maximum strafe speed.
set bot_skill "2" // Bot version of cvar "skill".
set bot_walk "0" // Bots are forced to walk slowly.
seta gl_conback "gfx/devcon"
seta con_textfont "fonts/IBMPlexMono-Text.otf?col=1,1,1"
seta con_textsize "14"
set cg_chatEnabled "1" // Enable the display of chat messages.
set cg_damageShake "0" // Shake the display upon taking damage.
set cg_hudAspect "0" // Aspect ratio override for the HUD. 1.0 is 1:1 square, 0 is auto.

View file

@ -12,8 +12,8 @@ entityDef player
entityDef player_mp
{
"inherit" "player"
"ammo_9mm" "44"
"ammo_pistol" "150"
"item" "item_suit"
"weapon" "weapon_crowbar,weapon_pistol"
"current_weapon" "1"
"current_weapon" "1"
}

View file

@ -56,7 +56,6 @@ entityDef fireInfo_shotgun
{
"def_onFire" "projectile_shotgun"
"ammoPerShot" "1"
"fireRate" "0.75"
"actFire" "1"
"actFireStop" "8"
"punchAngle" "-5 0 0"
@ -68,7 +67,6 @@ entityDef fireInfo_altShotgun
{
"def_onFire" "projectile_shotgun_alt"
"ammoPerShot" "2"
"fireRate" "1.5"
"actFire" "2"
"actFireStop" "8"
"punchAngle" "-10 0 0"

View file

@ -8,7 +8,7 @@ seta "con_color" "255 150 0"
seta "vgui_color" "255 170 0"
seta "cross_color" "0 255 0"
seta pm_walkspeed 190
seta pm_runspeed 320
seta pm_walkspeed "190"
seta pm_runspeed "320"
seta fov "65"
seta r_imageextensions "vtf tga"

View file

@ -5,7 +5,7 @@ bind "a" "+moveleft"
bind "d" "+moveright"
bind "SPACE" "+jump"
bind "CTRL" "+duck"
bind "SHIFT" "+speed"
bind "SHIFT" "+sprint"
bind "0" "slot10"
bind "1" "slot1"
bind "2" "slot2"

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,17 @@
{
nopicmip
nocompress
{
rgbGen const (0 1 1)
map gfx/console2.tga
}
{
rgbGen const (0 1 1)
map gfx/console1.tga
tcMod scroll 0.01 0.02
tcMod scale 8 4
blendFunc add
}
}