NSRenderableEntity: Add RenderFX RFX_GLOWSHELL2, which is the same as RFX_GLOWSHELL, but
the glow effect has a 'cull back' rendering flag.
This commit is contained in:
parent
a8c8938408
commit
e08852284f
6 changed files with 39 additions and 1 deletions
|
@ -113,6 +113,18 @@ Viewmodel_ApplyBob(entity gun)
|
||||||
strength = 240 - strength;
|
strength = 240 - strength;
|
||||||
strength *= 0.005f;
|
strength *= 0.005f;
|
||||||
|
|
||||||
|
#ifdef WASTES
|
||||||
|
float sprint;
|
||||||
|
if (pSeatLocal->m_iSprinting && vlen(pSeat->m_vecPredictedVelocity) > 240) {
|
||||||
|
pSeatLocal->m_flSprintLerp = bound(0.0f, pSeatLocal->m_flSprintLerp + clframetime, 1.0f);
|
||||||
|
} else {
|
||||||
|
pSeatLocal->m_flSprintLerp = bound(0.0f, pSeatLocal->m_flSprintLerp - clframetime, 1.0f);
|
||||||
|
}
|
||||||
|
sprint = 20 * pSeatLocal->m_flSprintLerp;
|
||||||
|
gun.angles[0] += sprint;
|
||||||
|
gun.angles[1] += sprint + (sprint * pViewBob->m_flBob) * 0.25f;
|
||||||
|
#endif
|
||||||
|
|
||||||
gun.angles[0] += strength * sintime;
|
gun.angles[0] += strength * sintime;
|
||||||
gun.angles[1] += strength * sintime;
|
gun.angles[1] += strength * sintime;
|
||||||
gun.angles[2] += strength * sintime;
|
gun.angles[2] += strength * sintime;
|
||||||
|
|
|
@ -41,6 +41,7 @@ font_s FONT_CON;
|
||||||
|
|
||||||
//var string g_shellchrome;
|
//var string g_shellchrome;
|
||||||
var float g_shellchromeshader;
|
var float g_shellchromeshader;
|
||||||
|
var float g_shellchromeshader_cull;
|
||||||
|
|
||||||
/* clientside cvars */
|
/* clientside cvars */
|
||||||
var float autocvar_zoom_sensitivity = 1.0f;
|
var float autocvar_zoom_sensitivity = 1.0f;
|
||||||
|
|
|
@ -119,6 +119,7 @@ CSQC_RendererRestarted(string rstr)
|
||||||
|
|
||||||
//g_shellchrome = spriteframe("sprites/shellchrome.spr", 0, 0.0f);
|
//g_shellchrome = spriteframe("sprites/shellchrome.spr", 0, 0.0f);
|
||||||
g_shellchromeshader = shaderforname("shellchrome", sprintf("{\ndeformVertexes bulge 1.25 1.25 0\n{\nmap %s\ntcMod scroll -0.1 0.1\ntcGen environment\nrgbGen entity\n}\n}", "textures/sfx/reflection.tga"));
|
g_shellchromeshader = shaderforname("shellchrome", sprintf("{\ndeformVertexes bulge 1.25 1.25 0\n{\nmap %s\ntcMod scroll -0.1 0.1\ntcGen environment\nrgbGen entity\n}\n}", "textures/sfx/reflection.tga"));
|
||||||
|
g_shellchromeshader_cull = shaderforname("shellchrome2", sprintf("{\ncull back\ndeformVertexes bulge 1.5 1.5 0\n{\nmap %s\ntcMod scroll -0.1 0.1\ntcGen environment\nrgbGen entity\n}\n}", "textures/sfx/reflection.tga"));
|
||||||
|
|
||||||
/* end msg */
|
/* end msg */
|
||||||
print("Graphical resources reloaded\n");
|
print("Graphical resources reloaded\n");
|
||||||
|
|
|
@ -49,7 +49,8 @@ enum
|
||||||
RFX_CONSTANTGLOW = 14,
|
RFX_CONSTANTGLOW = 14,
|
||||||
RFX_DISTORT = 15,
|
RFX_DISTORT = 15,
|
||||||
RFX_HOLOGRAM = 16,
|
RFX_HOLOGRAM = 16,
|
||||||
RFX_GLOWSHELL = 19
|
RFX_GLOWSHELL = 19,
|
||||||
|
RFX_GLOWSHELL2 = 20
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -427,6 +427,22 @@ NSRenderableEntity::RenderFXPass(void)
|
||||||
drawflags = 7;
|
drawflags = 7;
|
||||||
abslight = 128;
|
abslight = 128;
|
||||||
break;
|
break;
|
||||||
|
case RFX_GLOWSHELL2:
|
||||||
|
/* make this entity shellchrome */
|
||||||
|
effects = EF_ADDITIVE;
|
||||||
|
fatness = 0;
|
||||||
|
colormod = m_vecRenderColor;
|
||||||
|
forceshader = g_shellchromeshader_cull;
|
||||||
|
alpha = 1.0;
|
||||||
|
/* copy entity into rendering queue */
|
||||||
|
addentity(this);
|
||||||
|
/* reset */
|
||||||
|
forceshader = 0;
|
||||||
|
fatness = 0;
|
||||||
|
colormod = [1,1,1];
|
||||||
|
alpha = 1.0f;
|
||||||
|
effects = 0;
|
||||||
|
break;
|
||||||
case RFX_GLOWSHELL:
|
case RFX_GLOWSHELL:
|
||||||
/* make this entity shellchrome */
|
/* make this entity shellchrome */
|
||||||
effects = EF_ADDITIVE;
|
effects = EF_ADDITIVE;
|
||||||
|
|
|
@ -565,6 +565,8 @@ prop_vehicle_driveable::RunVehiclePhysics(void)
|
||||||
new_origin *= 0.25f;
|
new_origin *= 0.25f;
|
||||||
setorigin(this, new_origin);
|
setorigin(this, new_origin);
|
||||||
PlayerAlign();
|
PlayerAlign();
|
||||||
|
|
||||||
|
/* actiony stuff */
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SERVER
|
#ifdef SERVER
|
||||||
|
@ -604,6 +606,8 @@ prop_vehicle_driveable::Respawn(void)
|
||||||
|
|
||||||
if (m_eDriver)
|
if (m_eDriver)
|
||||||
PlayerLeave((base_player)m_eDriver);
|
PlayerLeave((base_player)m_eDriver);
|
||||||
|
|
||||||
|
SendFlags = -1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -720,6 +724,9 @@ prop_vehicle_driveable::SendEntity(entity ePVSent, float flSendFlags)
|
||||||
WriteByte(MSG_ENTITY, ENT_VEH_4WHEEL);
|
WriteByte(MSG_ENTITY, ENT_VEH_4WHEEL);
|
||||||
WriteFloat(MSG_ENTITY, flSendFlags);
|
WriteFloat(MSG_ENTITY, flSendFlags);
|
||||||
|
|
||||||
|
if (!modelindex)
|
||||||
|
return (false);
|
||||||
|
|
||||||
if (flSendFlags & VEHFL_DRIVER) {
|
if (flSendFlags & VEHFL_DRIVER) {
|
||||||
WriteEntity(MSG_ENTITY, m_eDriver);
|
WriteEntity(MSG_ENTITY, m_eDriver);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue