Include draw.qc from Nuclide's base game

This commit is contained in:
Marco Cawthorne 2021-03-17 06:27:05 +01:00
parent 24428a072f
commit 9f9def03f3
5 changed files with 45 additions and 23 deletions

View file

@ -34,7 +34,7 @@ ClientGame_ConsoleCommand(void)
Textmenu_Toggle("RADIOC");
break;
case "nightvision":
/*Nightvision_Toggle();*/
Nightvision_Toggle();
break;
case "drop":
sendevent("DropWeapon", "");

View file

@ -146,6 +146,7 @@ struct
int m_iTimeUnitsOld;
float m_flTimeAlpha;
vector m_vecMoneyColor;
int m_iNightvision;
} g_seats[4], *pSeat;
void HUD_DrawAmmo1(void);

View file

@ -14,30 +14,14 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/*
=================
Predict_PreFrame
We're part way through parsing new player data.
Propagate our pmove state to whatever the current frame before its stomped on
(so any non-networked state updates locally).
=================
*/
void
GamePredict_PreFrame(player pl)
ClientGame_PreDraw(void)
{
}
/*
=================
Predict_PostFrame
We're part way through parsing new player data.
Rewind our pmove state back to before we started predicting.
(to give consistent state instead of accumulating errors)
=================
*/
void
GamePredict_PostFrame(player pl)
ClientGame_PostDraw(void)
{
}

37
src/client/nightvision.qc Normal file
View file

@ -0,0 +1,37 @@
/*
* Copyright (c) 2016-2021 Marco Hladik <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
Nightvision_Toggle(void)
{
pSeat->m_iNightvision = 1 - pSeat->m_iNightvision;
}
void
Nightvision_PreFrame(void)
{
if (!pSeat->m_iNightvision)
return;
}
void
Nightvision_PostFrame(void)
{
if (!pSeat->m_iNightvision)
return;
}

View file

@ -1,6 +1,5 @@
#pragma target fte
#pragma progs_dat "../../csprogs.dat"
#pragma includedir "../../../valve/src"
#define CSQC
#define CLIENT
@ -20,7 +19,8 @@ defs.h
../../../src/gs-entbase/shared.src
../shared/include.src
predict.qc
nightvision.qc
draw.qc
textmenu.qc
init.qc
player.qc