Compare commits
6 Commits
9d3ec2b89c
...
00827d44b4
Author | SHA1 | Date |
---|---|---|
Marco Cawthorne | 00827d44b4 | |
Marco Cawthorne | 42f7c82029 | |
Marco Cawthorne | 153a711955 | |
Marco Cawthorne | d66bc506ca | |
Marco Cawthorne | 5324616382 | |
Marco Cawthorne | f2aba72c0c |
|
@ -3,6 +3,8 @@ var string g_damage_spr_b;
|
|||
var string g_damage_spr_l;
|
||||
var string g_damage_spr_r;
|
||||
|
||||
var float autocvar_cg_damageFill = 0.25f;
|
||||
|
||||
void
|
||||
Damage_Precache(void)
|
||||
{
|
||||
|
@ -12,6 +14,8 @@ Damage_Precache(void)
|
|||
g_damage_spr_l = spriteframe("sprites/640_pain.spr", 3, 0.0f);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void HUD_DamageNotify_Check();
|
||||
void
|
||||
Damage_Draw(void)
|
||||
|
@ -58,5 +62,11 @@ Damage_Draw(void)
|
|||
[48,128], [1,1,1], rt_alpha, DRAWFLAG_ADDITIVE);
|
||||
}
|
||||
|
||||
if (autocvar_cg_damageFill > 0.0) {
|
||||
vector finalColor = [1,1,1];
|
||||
finalColor[1] = finalColor[2] = 1.0 - (pSeat->m_flDamageAlpha * autocvar_cg_damageFill);
|
||||
drawpic(video_mins, "fade_modulate", video_res, finalColor, 1.0, DRAWFLAG_NORMAL);
|
||||
}
|
||||
|
||||
pSeat->m_flDamageAlpha -= clframetime;
|
||||
}
|
||||
|
|
|
@ -78,16 +78,33 @@ HUD_ItemNotify_Insert(int type, int count)
|
|||
void
|
||||
HUD_ItemNotify_Check(player pl)
|
||||
{
|
||||
int healthdiff = bound(0, pl.health - pSeatLocal->m_iHealthOld, 100);
|
||||
int armordiff = bound(0, pl.armor - pSeatLocal->m_iArmorOld, 100);
|
||||
int longjumpdiff = ((pl.g_items & ITEM_LONGJUMP) > (pSeatLocal->m_iItemsOld & ITEM_LONGJUMP)) == TRUE;
|
||||
int healthdiff = (int)bound(0, pl.health - pSeatLocal->m_iHealthOld, 100);
|
||||
int armordiff = (int)bound(0, pl.armor - pSeatLocal->m_iArmorOld, 100);
|
||||
bool ljDiff = ((pl.g_items & ITEM_LONGJUMP) > (pSeatLocal->m_iItemsOld & ITEM_LONGJUMP)) ? true : false;
|
||||
bool suitDiff = ((pl.g_items & ITEM_SUIT) > (pSeatLocal->m_iItemsOld & ITEM_SUIT)) ? true : false;
|
||||
|
||||
if (healthdiff > 1)
|
||||
HUD_ItemNotify_Insert(1, 1);
|
||||
if (armordiff > 1)
|
||||
HUD_ItemNotify_Insert(0, 1);
|
||||
if (longjumpdiff)
|
||||
HUD_ItemNotify_Insert(2, 1);
|
||||
if ((pl.g_items & ITEM_SUIT)) {
|
||||
if (suitDiff == false) {
|
||||
if (healthdiff > 1i) {
|
||||
HUD_ItemNotify_Insert(1, 1);
|
||||
}
|
||||
if (armordiff > 1i) {
|
||||
HUD_ItemNotify_Insert(0, 1);
|
||||
}
|
||||
if (ljDiff) {
|
||||
HUD_ItemNotify_Insert(2, 1);
|
||||
}
|
||||
} else {
|
||||
/* just picked up a suit, reset display values */
|
||||
pSeatLocal->m_iHealthOld = (int)pl.health;
|
||||
pSeatLocal->m_iArmorOld = (int)pl.armor;
|
||||
pSeatLocal->m_iAmmo1Old = (int)pl.a_ammo1;
|
||||
pSeatLocal->m_iAmmo2Old = (int)pl.a_ammo2;
|
||||
pSeatLocal->m_iAmmo3Old = (int)pl.a_ammo3;
|
||||
pSeatLocal->m_iPickupWeapon = 0i;
|
||||
pSeatLocal->m_flPickupAlpha = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
pSeatLocal->m_iItemsOld = pl.g_items;
|
||||
}
|
|
@ -169,7 +169,7 @@ HUD_SlotSelect(int slot)
|
|||
if (pSeat->m_flHUDWeaponSelectTime < time) {
|
||||
pl.StartSoundDef("Player.WeaponSelectionOpen", CHAN_ITEM, false);
|
||||
} else {
|
||||
pl.StartSoundDef("Player WeaponSelectionMoveSlot", CHAN_ITEM, false);
|
||||
pl.StartSoundDef("Player.WeaponSelectionMoveSlot", CHAN_ITEM, false);
|
||||
}
|
||||
|
||||
/* weren't in that slot? select the first one then */
|
||||
|
@ -212,7 +212,7 @@ HUD_DrawWeaponSelect(void)
|
|||
}
|
||||
if (pSeat->m_flHUDWeaponSelectTime < time) {
|
||||
if (pSeat->m_iHUDWeaponSelected) {
|
||||
pl.StartSoundDef("Player WeaponSelectionClose", CHAN_ITEM, false);
|
||||
pl.StartSoundDef("Player.WeaponSelectionClose", CHAN_ITEM, false);
|
||||
pSeat->m_iHUDWeaponSelected = 0;
|
||||
}
|
||||
return;
|
||||
|
|
|
@ -133,7 +133,37 @@ HLMultiplayerRules::PlayerDeath(NSClientPlayer pl)
|
|||
float gibStrength = g_dmg_iDamage * 2.0f;
|
||||
BreakModel_Entity(pl, gibDir, gibStrength);
|
||||
} else {
|
||||
FX_Corpse_Spawn((player)pl, ANIM_DIESIMPLE);
|
||||
float deathAnimation;
|
||||
|
||||
switch (g_dmg_iHitBody) {
|
||||
case BODY_HEAD:
|
||||
deathAnimation = ANIM_DIEHEADSHOT;
|
||||
break;
|
||||
case BODY_CHEST:
|
||||
deathAnimation = ANIM_DIESPIN;
|
||||
break;
|
||||
case BODY_STOMACH:
|
||||
deathAnimation = ANIM_DIEGUTSHOT;
|
||||
break;
|
||||
default:
|
||||
bool isFacing = pl.IsFacingPosition(g_dmg_vecLocation);
|
||||
deathAnimation = ANIM_DIESIMPLE;
|
||||
|
||||
if (isFacing == false) {
|
||||
deathAnimation = ANIM_DIEFORWARD;
|
||||
} else {
|
||||
deathAnimation = random() < 0.5 ? ANIM_DIEBACKWARDS1 : ANIM_DIEBACKWARDS1;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
NSEntity newCorpse = (NSEntity)FX_Corpse_Spawn((player)pl, deathAnimation);
|
||||
|
||||
/* if we were crouching, adjust the bbox (thx 2 lack of crouch death animation) */
|
||||
if (pl.flags & FL_CROUCHING) {
|
||||
newCorpse.SetSize(VEC_HULL_MIN, [16, 16, -16]);
|
||||
}
|
||||
}
|
||||
|
||||
/* now let's make the real client invisible */
|
||||
|
@ -142,7 +172,7 @@ HLMultiplayerRules::PlayerDeath(NSClientPlayer pl)
|
|||
pl.gflags &= ~GF_FLASHLIGHT;
|
||||
pl.gflags &= ~GF_EGONBEAM;
|
||||
|
||||
Sound_Play(pl, CHAN_AUTO, "Player.Death");
|
||||
pl.StartSoundDef("Player.Death", CHAN_AUTO, true);
|
||||
|
||||
/* force respawn */
|
||||
if (cvar("mp_forcerespawn") == 1) {
|
||||
|
|
|
@ -13,35 +13,3 @@
|
|||
* 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 info_player_start(void)
|
||||
{
|
||||
self.solid = SOLID_TRIGGER;
|
||||
self.botinfo = BOTINFO_SPAWNPOINT;
|
||||
setsize(self, VEC_HULL_MIN, VEC_HULL_MAX);
|
||||
setorigin_safe(self, self.origin);
|
||||
}
|
||||
|
||||
void info_player_deathmatch(void)
|
||||
{
|
||||
self.solid = SOLID_TRIGGER;
|
||||
self.botinfo = BOTINFO_SPAWNPOINT;
|
||||
setsize(self, VEC_HULL_MIN, VEC_HULL_MAX);
|
||||
setorigin_safe(self, self.origin);
|
||||
}
|
||||
|
||||
void info_player_team1(void)
|
||||
{
|
||||
self.solid = SOLID_TRIGGER;
|
||||
self.botinfo = BOTINFO_SPAWNPOINT;
|
||||
setsize(self, VEC_HULL_MIN, VEC_HULL_MAX);
|
||||
setorigin_safe(self, self.origin);
|
||||
}
|
||||
|
||||
void info_player_team2(void)
|
||||
{
|
||||
self.solid = SOLID_TRIGGER;
|
||||
self.botinfo = BOTINFO_SPAWNPOINT;
|
||||
setsize(self, VEC_HULL_MIN, VEC_HULL_MAX);
|
||||
setorigin_safe(self, self.origin);
|
||||
}
|
||||
|
|
|
@ -58,6 +58,9 @@ entity
|
|||
FX_Corpse_Spawn(player pl, float anim)
|
||||
{
|
||||
NSRenderableEntity body_next = (NSRenderableEntity)FX_Corpse_Next();
|
||||
body_next.SetMovetype(MOVETYPE_BOUNCE);
|
||||
body_next.SetSolid(SOLID_CORPSE);
|
||||
body_next.SetModel(pl.GetModel());
|
||||
|
||||
if (pl.flags & FL_CROUCHING) {
|
||||
body_next.SetOrigin(pl.GetOrigin() + [0,0,32]);
|
||||
|
@ -65,10 +68,7 @@ FX_Corpse_Spawn(player pl, float anim)
|
|||
body_next.SetOrigin(pl.GetOrigin());
|
||||
}
|
||||
|
||||
body_next.SetMovetype(MOVETYPE_BOUNCE);
|
||||
body_next.SetSolid(SOLID_CORPSE);
|
||||
body_next.SetModel(pl.GetModel());
|
||||
body_next.SetSize(VEC_HULL_MIN, [16, 16, -16]);
|
||||
body_next.SetSize(pl.GetMins(), pl.GetMaxs());
|
||||
body_next.SetAngles(pl.GetAngles());
|
||||
body_next.SetVelocity(pl.GetVelocity() + [0,0,120]);
|
||||
body_next.SetFrame(anim);
|
||||
|
|
|
@ -4,13 +4,12 @@ entityDef monster_sitting_scientist
|
|||
"model" "models/scientist.mdl"
|
||||
"netname" "Seated Scientist"
|
||||
"health" "skill:scientist_health"
|
||||
"mins" "-16 -16 0"
|
||||
"mins" "-16 -16 -8"
|
||||
"maxs" "16 16 72"
|
||||
"eye_height" "64"
|
||||
"team" "0"
|
||||
"propdata" "actor_human"
|
||||
|
||||
"frame" "75"
|
||||
"sequence" "75"
|
||||
|
||||
when "body" equals "1" {
|
||||
"pitch" "105"
|
||||
|
|
|
@ -1,29 +1,43 @@
|
|||
func_tracktrain.move_1
|
||||
{
|
||||
follow
|
||||
looping
|
||||
sample plats/ttrain1.wav
|
||||
}
|
||||
func_tracktrain.move_2
|
||||
{
|
||||
follow
|
||||
looping
|
||||
sample plats/ttrain2.wav
|
||||
}
|
||||
func_tracktrain.move_3
|
||||
{
|
||||
follow
|
||||
looping
|
||||
sample plats/ttrain3.wav
|
||||
}
|
||||
func_tracktrain.move_4
|
||||
{
|
||||
follow
|
||||
looping
|
||||
sample plats/ttrain4.wav
|
||||
}
|
||||
func_tracktrain.move_5
|
||||
{
|
||||
follow
|
||||
looping
|
||||
sample plats/ttrain5.wav
|
||||
}
|
||||
func_tracktrain.move_6
|
||||
{
|
||||
follow
|
||||
looping
|
||||
sample plats/ttrain6.wav
|
||||
}
|
||||
func_tracktrain.move_7
|
||||
{
|
||||
follow
|
||||
looping
|
||||
sample plats/ttrain7.wav
|
||||
}
|
||||
|
||||
|
|
|
@ -1,57 +1,85 @@
|
|||
func_train.move_1
|
||||
{
|
||||
follow
|
||||
looping
|
||||
sample common/null.wav
|
||||
}
|
||||
func_train.move_2
|
||||
{
|
||||
follow
|
||||
looping
|
||||
sample plats/bigmove1.wav
|
||||
}
|
||||
func_train.move_3
|
||||
{
|
||||
follow
|
||||
looping
|
||||
sample plats/bigmove2.wav
|
||||
}
|
||||
func_train.move_4
|
||||
{
|
||||
follow
|
||||
looping
|
||||
sample plats/elevmove1.wav
|
||||
}
|
||||
func_train.move_5
|
||||
{
|
||||
follow
|
||||
looping
|
||||
sample plats/elevmove2.wav
|
||||
}
|
||||
func_train.move_6
|
||||
{
|
||||
follow
|
||||
looping
|
||||
sample plats/elevmove3.wav
|
||||
}
|
||||
func_train.move_7
|
||||
{
|
||||
follow
|
||||
looping
|
||||
sample plats/freightmove1.wav
|
||||
}
|
||||
func_train.move_8
|
||||
{
|
||||
follow
|
||||
looping
|
||||
sample plats/freightmove2.wav
|
||||
}
|
||||
func_train.move_9
|
||||
{
|
||||
follow
|
||||
looping
|
||||
sample plats/heavymove1.wav
|
||||
}
|
||||
func_train.move_10
|
||||
{
|
||||
follow
|
||||
looping
|
||||
sample plats/rackmove1.wav
|
||||
}
|
||||
func_train.move_11
|
||||
{
|
||||
follow
|
||||
looping
|
||||
sample plats/railmove1.wav
|
||||
}
|
||||
func_train.move_12
|
||||
{
|
||||
follow
|
||||
looping
|
||||
sample plats/squeekmove1.wav
|
||||
}
|
||||
func_train.move_13
|
||||
{
|
||||
follow
|
||||
looping
|
||||
sample plats/talkmove1.wav
|
||||
}
|
||||
func_train.move_14
|
||||
{
|
||||
follow
|
||||
looping
|
||||
sample plats/talkmove2.wav
|
||||
}
|
||||
|
||||
|
@ -89,5 +117,6 @@ func_train.stop_8
|
|||
}
|
||||
func_train.stop_9
|
||||
{
|
||||
|
||||
sample plats/talkstop1.wav
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue