Lots of small clean ups and microoptimisations. ambient_generic has also been fixed in multiplayer and made to save more bandwidth.
Rename a bunch of cvars to be more in a more consitent style similar to later id Tech games.
This commit is contained in:
parent
6ee21bc0ea
commit
b2925d46e4
15 changed files with 143 additions and 58 deletions
|
@ -84,7 +84,7 @@ Viewmodel_CalcBob(void)
|
|||
pViewBob->m_flBob2 = bound(-7, flBob, 4);
|
||||
|
||||
/* make sure it's adjusted for scale */
|
||||
pViewBob->m_flBob *= autocvar_r_viewmodelscale;
|
||||
pViewBob->m_flBob *= autocvar_r_cg_viewmodelScale;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -210,20 +210,20 @@ NSView::GetSensitivity(void)
|
|||
vector
|
||||
NSView::GetHUDCanvasPos(void)
|
||||
{
|
||||
if (autocvar_cl_hudaspect <= 0) {
|
||||
if (autocvar_cg_hudAspect <= 0) {
|
||||
return m_vecPosition;
|
||||
} else {
|
||||
return [m_vecPosition[0] + ((m_vecSize[0] / 2) - ((m_vecSize[1] * autocvar_cl_hudaspect) / 2)), m_vecPosition[1]];
|
||||
return [m_vecPosition[0] + ((m_vecSize[0] / 2) - ((m_vecSize[1] * autocvar_cg_hudAspect) / 2)), m_vecPosition[1]];
|
||||
}
|
||||
}
|
||||
|
||||
vector
|
||||
NSView::GetHUDCanvasSize(void)
|
||||
{
|
||||
if (autocvar_cl_hudaspect <= 0) {
|
||||
if (autocvar_cg_hudAspect <= 0) {
|
||||
return m_vecSize;
|
||||
} else {
|
||||
return [m_vecSize[1] * autocvar_cl_hudaspect, m_vecSize[1]];
|
||||
return [m_vecSize[1] * autocvar_cg_hudAspect, m_vecSize[1]];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
var bool autocvar_cl_chat_enabled = true;
|
||||
var bool autocvar_cg_chatEnabled = true;
|
||||
|
||||
#define CHAT_LINES 5
|
||||
#define CHAT_TIME 5
|
||||
|
@ -59,7 +59,7 @@ Chat_Draw(void)
|
|||
Font_DrawText(temppos + [0,16], tempstr, g_fntChat);
|
||||
}
|
||||
|
||||
if (autocvar_cl_chat_enabled == false)
|
||||
if (autocvar_cg_chatEnabled == false)
|
||||
return;
|
||||
|
||||
g_chatpos[0] = g_hudmins[0] + 16;
|
||||
|
@ -105,7 +105,7 @@ Chat_Parse(string msg)
|
|||
g_chattime = time + CHAT_TIME;
|
||||
|
||||
/* we need to be silent */
|
||||
if (autocvar_cl_chat_enabled == false)
|
||||
if (autocvar_cg_chatEnabled == false)
|
||||
return;
|
||||
|
||||
localsound("misc/talk.wav");
|
||||
|
|
|
@ -287,13 +287,13 @@ Cmd_Parse(string sCMD)
|
|||
pSeat->m_iInputUse = FALSE;
|
||||
break;
|
||||
case "+duck":
|
||||
if (autocvar_cl_crouch_toggle == true)
|
||||
if (autocvar_pm_crouchToggle == true)
|
||||
pSeat->m_iInputDuck = 1 - pSeat->m_iInputDuck;
|
||||
else
|
||||
pSeat->m_iInputDuck = TRUE;
|
||||
break;
|
||||
case "-duck":
|
||||
if (autocvar_cl_crouch_toggle == false)
|
||||
if (autocvar_pm_crouchToggle == false)
|
||||
pSeat->m_iInputDuck = FALSE;
|
||||
break;
|
||||
case "invnext":
|
||||
|
|
|
@ -49,7 +49,7 @@ Cross_DrawSubRGBA(string strMat, vector vecSize, vector vecSrcPos, vector vecSrc
|
|||
{
|
||||
static vector cross_pos;
|
||||
|
||||
if (cvar("cl_thirdperson") < 1) {
|
||||
if (cvar("pm_thirdPerson") < 1) {
|
||||
cross_pos = g_hudmins + (g_hudres / 2) + [-(vecSize[0]/2),-(vecSize[1]/2)];
|
||||
cross_pos[0] = rint(cross_pos[0]);
|
||||
cross_pos[1] = rint(cross_pos[1]);
|
||||
|
|
|
@ -92,20 +92,18 @@ var float g_shellchromeshader;
|
|||
var float g_shellchromeshader_cull;
|
||||
|
||||
/* clientside cvars */
|
||||
var float autocvar_zoom_sensitivity = 1.0f;
|
||||
var int autocvar_cl_smoothstairs = TRUE;
|
||||
var int autocvar_cl_thirdperson = FALSE;
|
||||
var int autocvar_v_lefthanded = FALSE;
|
||||
var string autocvar_cl_logofile = "lambda";
|
||||
var vector autocvar_cl_logocolor = [255,0,0];
|
||||
var float autocvar_in_zoomSensitivity = 1.0f;
|
||||
var int autocvar_pm_stairSmoothing = TRUE;
|
||||
var int autocvar_pm_thirdPerson = FALSE;
|
||||
var int autocvar_cg_viewmodelFlip = FALSE;
|
||||
var vector autocvar_con_color = [255,150,0];
|
||||
var vector autocvar_vgui_color = [255,170,0];
|
||||
var vector autocvar_v_gunofs = [0,0,0];
|
||||
var int autocvar_r_viewmodelpass = 0;
|
||||
var float autocvar_r_viewmodelfov = 90.0f;
|
||||
var float autocvar_r_viewmodelscale = 1.0f;
|
||||
var float autocvar_cl_hudaspect = 0.0f;
|
||||
var bool autocvar_cl_crouch_toggle = false;
|
||||
var vector autocvar_cg_viewmodelOffset = [0,0,0];
|
||||
var int autocvar_cg_viewmodelPass = 0;
|
||||
var float autocvar_cg_viewmodelFov = 90.0f;
|
||||
var float autocvar_cg_viewmodelScale = 1.0f;
|
||||
var float autocvar_cg_hudAspect = 0.0f;
|
||||
var bool autocvar_pm_crouchToggle = false;
|
||||
|
||||
/* particle descriptors */
|
||||
var float PART_DUSTMOTE;
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
var bool autocvar_v_modellag = 0;
|
||||
var bool autocvar_v_muzzledlight = 1;
|
||||
var bool autocvar_cg_viewmodelLag = 0;
|
||||
var bool autocvar_cg_muzzleDLight = 1;
|
||||
|
||||
void
|
||||
View_Init(void)
|
||||
|
@ -99,13 +99,13 @@ View_CalcViewport(int s, float fWinWidth, float fWinHeight)
|
|||
}
|
||||
|
||||
/* generate usable hud variables */
|
||||
if (autocvar_cl_hudaspect <= 0) {
|
||||
if (autocvar_cg_hudAspect <= 0) {
|
||||
g_hudmins = video_mins;
|
||||
g_hudres = video_res;
|
||||
} else {
|
||||
g_hudmins = video_mins;
|
||||
g_hudmins[0] += (video_res[0] / 2) - ((video_res[1] * autocvar_cl_hudaspect) / 2);
|
||||
g_hudres[0] = video_res[1] * autocvar_cl_hudaspect;
|
||||
g_hudmins[0] += (video_res[0] / 2) - ((video_res[1] * autocvar_cg_hudAspect) / 2);
|
||||
g_hudres[0] = video_res[1] * autocvar_cg_hudAspect;
|
||||
g_hudres[1] = video_res[1];
|
||||
}
|
||||
#else
|
||||
|
@ -185,7 +185,7 @@ View_DrawViewModel(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (cvar("r_drawviewmodel") == 0 || autocvar_cl_thirdperson == TRUE) {
|
||||
if (cvar("r_drawviewmodel") == 0 || autocvar_pm_thirdPerson == TRUE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -203,7 +203,7 @@ View_DrawViewModel(void)
|
|||
|
||||
makevectors(view_angles);
|
||||
|
||||
if (autocvar_v_modellag == 0)
|
||||
if (autocvar_cg_viewmodelLag == 0)
|
||||
m_eViewModel.angles = view_angles;
|
||||
else {
|
||||
float limit;
|
||||
|
@ -212,7 +212,7 @@ View_DrawViewModel(void)
|
|||
pSeat->m_vecLag = v_forward;
|
||||
makevectors(view_angles);
|
||||
|
||||
if (autocvar_v_modellag == 2) {
|
||||
if (autocvar_cg_viewmodelLag == 2) {
|
||||
float pitchfix = fabs(view_angles[0] / 180);
|
||||
limit = dotproduct(pSeat->m_vecLag, v_forward) * (1.0 - pitchfix);
|
||||
speed = (1.0 - limit) * clframetime;
|
||||
|
@ -233,7 +233,7 @@ View_DrawViewModel(void)
|
|||
m_eViewModelL.colormap = m_eViewModel.colormap = pSeat->m_ePlayer.colormap;
|
||||
|
||||
/* now apply the scale hack */
|
||||
m_eViewModelL.scale = m_eViewModel.scale = autocvar_r_viewmodelscale;
|
||||
m_eViewModelL.scale = m_eViewModel.scale = autocvar_cg_viewmodelScale;
|
||||
|
||||
if (Client_IsSpectator(cl) || XR_Available(pl) == false) {
|
||||
m_eViewModelL.origin = g_view.GetCameraOrigin();
|
||||
|
@ -255,7 +255,7 @@ View_DrawViewModel(void)
|
|||
/* this is currently broken */
|
||||
#if 0
|
||||
// Left-handed weapons
|
||||
if (autocvar_v_lefthanded) {
|
||||
if (autocvar_cg_viewmodelFlip) {
|
||||
v_right *= -1;
|
||||
m_eViewModel.renderflags |= RF_USEAXIS;
|
||||
//m_eViewModel.forceshader = SHADER_CULLED;
|
||||
|
@ -275,7 +275,7 @@ View_DrawViewModel(void)
|
|||
m_eMuzzleflash.angles = m_eViewModel.angles;
|
||||
m_eMuzzleflash.angles[2] += (random() * 10) - 5;
|
||||
|
||||
if (autocvar_v_muzzledlight == true)
|
||||
if (autocvar_cg_muzzleDLight == true)
|
||||
dynamiclight_add(pSeat->m_vecPredictedOrigin + (v_forward * 32), 400, [1,0.45,0]);
|
||||
|
||||
setorigin(m_eMuzzleflash, m_eMuzzleflash.origin);
|
||||
|
@ -287,7 +287,7 @@ View_DrawViewModel(void)
|
|||
m_eMuzzleflashL.angles = m_eViewModelL.angles;
|
||||
m_eMuzzleflashL.angles[2] += (random() * 10) - 5;
|
||||
|
||||
if (autocvar_v_muzzledlight == true)
|
||||
if (autocvar_cg_muzzleDLight == true)
|
||||
dynamiclight_add(pSeat->m_vecPredictedOrigin + (v_forward * 32), 400, [1,0.45,0]);
|
||||
|
||||
setorigin(m_eMuzzleflashL, m_eMuzzleflashL.origin);
|
||||
|
|
|
@ -110,6 +110,7 @@ ambient_generic::ambient_generic(void)
|
|||
m_strSpawnPath = __NULL__;
|
||||
m_flSpawnVolume = 0.0f;
|
||||
m_flSpawnPitch = 0.0f;
|
||||
spawnflags |= MSF_MULTIPLAYER;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -335,7 +336,7 @@ ambient_generic::SendEntity(entity ePEnt, float flChanged)
|
|||
}
|
||||
|
||||
if (flChanged & AMBIENT_PATH)
|
||||
WriteString(MSG_ENTITY, m_strActivePath);
|
||||
WriteFloat(MSG_ENTITY, getsoundindex(m_strActivePath, true));
|
||||
if (flChanged & AMBIENT_VOLUME)
|
||||
WriteFloat(MSG_ENTITY, m_flVolume);
|
||||
if (flChanged & AMBIENT_RADIUS)
|
||||
|
@ -361,7 +362,7 @@ ambient_generic::ReceiveEntity(float isnew, float flChanged)
|
|||
}
|
||||
|
||||
if (flChanged & AMBIENT_PATH)
|
||||
m_strActivePath = readstring();
|
||||
m_strActivePath = soundnameforindex(readfloat());
|
||||
if (flChanged & AMBIENT_VOLUME)
|
||||
m_flVolume = readfloat();
|
||||
if (flChanged & AMBIENT_RADIUS)
|
||||
|
|
|
@ -18,7 +18,8 @@ enumflags
|
|||
{
|
||||
OCAMFL_CHANGED_ORIGIN,
|
||||
OCAMFL_CHANGED_ANGLES,
|
||||
OCAMFL_CHANGED_WAIT
|
||||
OCAMFL_CHANGED_WAIT,
|
||||
OCAMFL_CHANGED_VIEWER
|
||||
};
|
||||
|
||||
/*!QUAKED trigger_camera (1 0 0) (-8 -8 -8) (8 8 8)
|
||||
|
@ -43,12 +44,14 @@ This entity was introduced in Half-Life (1998).
|
|||
*/
|
||||
class trigger_camera:NSPointTrigger
|
||||
{
|
||||
entity m_eLooker;
|
||||
#ifdef CLIENT
|
||||
#else
|
||||
float m_flWait;
|
||||
string m_strAimAt;
|
||||
string m_strMoveTo;
|
||||
entity m_eLooker;
|
||||
entity m_eLooker_net;
|
||||
float m_flSpeed;
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
@ -82,6 +85,10 @@ trigger_camera::trigger_camera(void)
|
|||
void
|
||||
trigger_camera::ReceiveEntity(float flNew, float flFlags)
|
||||
{
|
||||
float flWait;
|
||||
|
||||
print(sprintf("camera update %d %d %x\n", entnum, flNew, flFlags));
|
||||
|
||||
if (flFlags & OCAMFL_CHANGED_ORIGIN) {
|
||||
origin[0] = readcoord();
|
||||
origin[1] = readcoord();
|
||||
|
@ -95,14 +102,25 @@ trigger_camera::ReceiveEntity(float flNew, float flFlags)
|
|||
angles[2] = readfloat();
|
||||
}
|
||||
|
||||
if (flFlags & OCAMFL_CHANGED_VIEWER) {
|
||||
m_eLooker = findfloat(world, ::entnum, readentitynum());
|
||||
}
|
||||
|
||||
if (flFlags & OCAMFL_CHANGED_WAIT) {
|
||||
flWait = readfloat();
|
||||
}
|
||||
|
||||
int s = (float)getproperty(VF_ACTIVESEAT);
|
||||
pSeat = &g_seats[s];
|
||||
|
||||
/* not us */
|
||||
if (m_eLooker != pSeat->m_ePlayer)
|
||||
return;
|
||||
|
||||
pSeat->m_vecCameraOrigin = origin;
|
||||
pSeat->m_vecCameraAngle = angles;
|
||||
|
||||
if (flFlags & OCAMFL_CHANGED_WAIT) {
|
||||
float flWait = readfloat();
|
||||
|
||||
if (flWait == -1)
|
||||
pSeat->m_flCameraTime = -1;
|
||||
else
|
||||
|
@ -136,23 +154,18 @@ trigger_camera::SpawnKey(string strKey, string strValue)
|
|||
void
|
||||
trigger_camera::Respawn(void)
|
||||
{
|
||||
SetSize([0,0,0], [0,0,0]);
|
||||
SetSolid(SOLID_NOT);
|
||||
SetMovetype(MOVETYPE_PUSH);
|
||||
SetModel(GetSpawnModel());
|
||||
SetOrigin(GetSpawnOrigin());
|
||||
m_eLooker = world;
|
||||
pvsflags = PVSF_IGNOREPVS;
|
||||
}
|
||||
|
||||
float
|
||||
trigger_camera::SendEntity(entity ePEnt, float flFlags)
|
||||
{
|
||||
if (clienttype(ePEnt) != CLIENTTYPE_REAL)
|
||||
return (0);
|
||||
|
||||
if (ePEnt != m_eLooker) {
|
||||
return (0);
|
||||
}
|
||||
|
||||
WriteByte(MSG_ENTITY, ENT_OLDCAMERA);
|
||||
WriteFloat(MSG_ENTITY, flFlags);
|
||||
|
||||
|
@ -168,6 +181,10 @@ trigger_camera::SendEntity(entity ePEnt, float flFlags)
|
|||
WriteFloat(MSG_ENTITY, angles[2]);
|
||||
}
|
||||
|
||||
if (flFlags & OCAMFL_CHANGED_VIEWER) {
|
||||
WriteEntity(MSG_ENTITY, m_eLooker);
|
||||
}
|
||||
|
||||
if (flFlags & OCAMFL_CHANGED_WAIT) {
|
||||
WriteFloat(MSG_ENTITY, m_flWait);
|
||||
}
|
||||
|
@ -189,9 +206,13 @@ trigger_camera::EvaluateEntity(void)
|
|||
if (ATTR_CHANGED(angles)) {
|
||||
SetSendFlags(OCAMFL_CHANGED_ANGLES);
|
||||
}
|
||||
if (ATTR_CHANGED(m_eLooker)) {
|
||||
SetSendFlags(OCAMFL_CHANGED_VIEWER);
|
||||
}
|
||||
|
||||
SAVE_STATE(origin)
|
||||
SAVE_STATE(angles)
|
||||
SAVE_STATE(m_eLooker)
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -210,9 +231,11 @@ trigger_camera::GoToTarget(void)
|
|||
vecVelocity = (eNode.origin - origin);
|
||||
flTravelTime = (vlen(vecVelocity) / eNode.m_flSpeed);
|
||||
|
||||
NSLog("trigger_camera (%s): Moving to path_corner %S within %f secs", targetname, target, flTravelTime);
|
||||
|
||||
if (!flTravelTime) {
|
||||
print("^1trigger_camera::^3GoToTarget^7: Distance short, going next\n");
|
||||
ScheduleThink(NextPath, 0.0f);
|
||||
NextPath();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -230,6 +253,8 @@ trigger_camera::NextPath(void)
|
|||
return;
|
||||
}
|
||||
|
||||
NSLog("trigger_camera (%s): Touched base with path_corner %S", targetname, target);
|
||||
|
||||
/* fire the path_corners' target */
|
||||
eNode.Trigger(this, TRIG_TOGGLE);
|
||||
|
||||
|
@ -260,6 +285,21 @@ trigger_camera::NextPath(void)
|
|||
void
|
||||
trigger_camera::Trigger(entity act, triggermode_t state)
|
||||
{
|
||||
/* HACK: if we don't have a valid activator... pick the first player we can find */
|
||||
if (!(act.flags & FL_CLIENT)) {
|
||||
act = find(world, ::classname, "player");
|
||||
}
|
||||
|
||||
print(sprintf("trigger_camera for %S is now %S\n", act.netname, targetname));
|
||||
|
||||
/* kill the other cams the player may be attached to */
|
||||
for (trigger_camera cam = world; (cam = (trigger_camera)find(cam, ::classname, "trigger_camera"));) {
|
||||
if (cam.m_eLooker == act) {
|
||||
cam.m_eLooker = __NULL__;
|
||||
cam.SetSendFlags(-1);
|
||||
}
|
||||
}
|
||||
|
||||
m_eLooker = act;
|
||||
NSLog("Triggering it on %s\n", act.netname);
|
||||
SetOrigin(GetSpawnOrigin());
|
||||
|
@ -268,6 +308,6 @@ trigger_camera::Trigger(entity act, triggermode_t state)
|
|||
SetTriggerTarget(m_strMoveTo);
|
||||
NextPath();
|
||||
GoToTarget();
|
||||
SetSendFlags(OCAMFL_CHANGED_ORIGIN | OCAMFL_CHANGED_ANGLES | OCAMFL_CHANGED_WAIT);
|
||||
SetSendFlags(-1);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -151,7 +151,7 @@ private:
|
|||
int sequence;
|
||||
|
||||
/* external weapon model */
|
||||
entity p_model;
|
||||
NSRenderableEntity p_model;
|
||||
int p_hand_bone;
|
||||
int p_model_bone;
|
||||
float lastweapon;
|
||||
|
|
|
@ -202,7 +202,8 @@ NSClientPlayer::predraw(void)
|
|||
input_movevalues[0] = dotproduct(velocity, v_forward);
|
||||
input_movevalues[1] = dotproduct(velocity, v_right);
|
||||
input_movevalues[2] = dotproduct(velocity, v_up);
|
||||
input_buttons = (flags & FL_JUMPRELEASED) ? 0 : INPUT_BUTTON2;
|
||||
input_buttons = (flags & FL_JUMPRELEASED) ? 0 : INPUT_BUTTON2; /* this may not help that much... */
|
||||
input_buttons |= (flags & FL_CROUCHING) ? INPUT_BUTTON8 : 0;
|
||||
input_angles = v_angle;
|
||||
input_impulse = 0;
|
||||
input_timelength = clframetime;
|
||||
|
@ -231,7 +232,7 @@ NSClientPlayer::predraw(void)
|
|||
}
|
||||
|
||||
/* if we're forcing third-person.. or this is not us - render this player */
|
||||
if (autocvar_cl_thirdperson == TRUE || !localplayer) {
|
||||
if (autocvar_pm_thirdPerson == TRUE || !localplayer) {
|
||||
/* mark as not-mirror-only */
|
||||
renderflags &= ~RF_EXTERNALMODEL;
|
||||
|
||||
|
@ -295,7 +296,7 @@ void
|
|||
NSClientPlayer::OnRemoveEntity(void)
|
||||
{
|
||||
if (p_model)
|
||||
remove(p_model);
|
||||
p_model.Destroy();
|
||||
|
||||
super::OnRemoveEntity();
|
||||
}
|
||||
|
@ -314,7 +315,7 @@ NSClientPlayer::UpdateAliveCam(void)
|
|||
if (veh.UpdateView)
|
||||
veh.UpdateView();
|
||||
} else if (health) {
|
||||
if (autocvar_cl_thirdperson == TRUE) {
|
||||
if (autocvar_pm_thirdPerson == TRUE) {
|
||||
makevectors(view_angles);
|
||||
vector vStart = [pSeat->m_vecPredictedOrigin[0], pSeat->m_vecPredictedOrigin[1], pSeat->m_vecPredictedOrigin[2] + 16] + (v_right * 4);
|
||||
vector vEnd = vStart + (v_forward * -48) + [0,0,16] + (v_right * 4);
|
||||
|
|
|
@ -201,6 +201,23 @@ float NSEntity::SendEntity( entity ePEnt, float flChanged ) {
|
|||
return ( 0 );
|
||||
|
||||
WriteByte( MSG_ENTITY, ENT_ENTITY );
|
||||
|
||||
/* optimisation */
|
||||
{
|
||||
/* we'll never network these if we aren't moving. */
|
||||
if (movetype == MOVETYPE_NONE) {
|
||||
flChanged &= ~BASEFL_CHANGED_VELOCITY_X;
|
||||
flChanged &= ~BASEFL_CHANGED_VELOCITY_Y;
|
||||
flChanged &= ~BASEFL_CHANGED_VELOCITY_Z;
|
||||
flChanged &= ~BASEFL_CHANGED_ANGULARVELOCITY;
|
||||
}
|
||||
|
||||
if (m_bIsBrush == true) {
|
||||
flChanged &= ~BASEFL_CHANGED_FLAGS;
|
||||
flChanged &= ~BASEFL_CHANGED_SCALE;
|
||||
}
|
||||
}
|
||||
|
||||
/* broadcast how much data is expected to be read */
|
||||
WriteFloat( MSG_ENTITY, flChanged );
|
||||
|
||||
|
|
|
@ -128,6 +128,29 @@ NSRenderableEntity::SendEntity(entity ePEnt, float flChanged)
|
|||
|
||||
WriteByte(MSG_ENTITY, ENT_ENTITYRENDERABLE);
|
||||
|
||||
/* optimisation */
|
||||
{
|
||||
/* we'll never network these if we aren't moving. */
|
||||
if (movetype == MOVETYPE_NONE) {
|
||||
flChanged &= ~RDENT_CHANGED_VELOCITY;
|
||||
flChanged &= ~RDENT_CHANGED_ANGULARVELOCITY;
|
||||
}
|
||||
|
||||
/* no rendermode means no extra fields */
|
||||
if (m_iRenderMode == RM_NORMAL) {
|
||||
flChanged &= ~RDENT_CHANGED_RENDERMODE;
|
||||
flChanged &= ~RDENT_CHANGED_RENDERCOLOR;
|
||||
flChanged &= ~RDENT_CHANGED_RENDERAMT;
|
||||
}
|
||||
|
||||
if (m_bIsBrush == true) {
|
||||
flChanged &= ~RDENT_CHANGED_FLAGS;
|
||||
flChanged &= ~RDENT_CHANGED_BODY;
|
||||
flChanged &= ~RDENT_CHANGED_SCALE;
|
||||
flChanged &= ~RDENT_CHANGED_CONTROLLER;
|
||||
}
|
||||
}
|
||||
|
||||
/* broadcast how much data is expected to be read */
|
||||
WriteFloat(MSG_ENTITY, flChanged);
|
||||
|
||||
|
|
|
@ -19,9 +19,9 @@ NSTalkMonster::NSTalkMonster(void)
|
|||
{
|
||||
#ifdef SERVER
|
||||
m_eFollowing = world;
|
||||
float m_flPitch = 1.0f;
|
||||
float m_flNextSentence = 0.0f;
|
||||
int m_iFlags = 0i;
|
||||
m_flPitch = 1.0f;
|
||||
m_flNextSentence = 0.0f;
|
||||
m_iFlags = 0i;
|
||||
m_eFollowingChain = __NULL__;
|
||||
m_vecLastUserPos = [0,0,0];
|
||||
m_flChangePath = 0.0f;
|
||||
|
|
|
@ -46,6 +46,11 @@ Weapons_Reload(NSClientPlayer pl)
|
|||
pl.m_activeweapon.Reload();
|
||||
}
|
||||
|
||||
void
|
||||
Weapons_PreDraw(NSClientPlayer pl, bool thirdperson)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
Weapons_SetGeomset(string foo)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue