Ouch left/right face expressions added.
This commit is contained in:
parent
e0d10f44e1
commit
92a6e8302e
8 changed files with 65 additions and 37 deletions
|
|
@ -142,6 +142,28 @@ Material Texture "models/DemoFace_Ouch.png"
|
|||
Uniform vec3 "RimFact" = ".6" "1." "1."
|
||||
Uniform vec3 "RimStep" = "0." ".5" ".5"
|
||||
}
|
||||
Material Texture "models/DemoFace_OuchLeft.png"
|
||||
{
|
||||
Brightmap "models/DemoFace_bright.png"
|
||||
Shader "shaders/glsl/Envmask.fp"
|
||||
Texture "masktex" "models/DemoFace_mask.png"
|
||||
Texture "envtex" "models/envmap/glss4env.png"
|
||||
Texture "rimtex" "models/envmap/glss4rim.png"
|
||||
Uniform vec3 "EnvFact" = ".4" "1." "1."
|
||||
Uniform vec3 "RimFact" = ".6" "1." "1."
|
||||
Uniform vec3 "RimStep" = "0." ".5" ".5"
|
||||
}
|
||||
Material Texture "models/DemoFace_OuchRight.png"
|
||||
{
|
||||
Brightmap "models/DemoFace_bright.png"
|
||||
Shader "shaders/glsl/Envmask.fp"
|
||||
Texture "masktex" "models/DemoFace_mask.png"
|
||||
Texture "envtex" "models/envmap/glss4env.png"
|
||||
Texture "rimtex" "models/envmap/glss4rim.png"
|
||||
Uniform vec3 "EnvFact" = ".4" "1." "1."
|
||||
Uniform vec3 "RimFact" = ".6" "1." "1."
|
||||
Uniform vec3 "RimStep" = "0." ".5" ".5"
|
||||
}
|
||||
Material Texture "models/DemoFace_Sad.png"
|
||||
{
|
||||
Brightmap "models/DemoFace_bright.png"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
[default]
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1220 \cu(mar 03 jun 2025 10:31:07 CEST)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r1220 \cu(2025-06-03 10:31:07)\c-";
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1221 \cu(mar 03 jun 2025 10:45:42 CEST)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r1221 \cu(2025-06-03 10:45:42)\c-";
|
||||
|
|
|
|||
Binary file not shown.
BIN
models/DemoFace_OuchLeft.png
Normal file
BIN
models/DemoFace_OuchLeft.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 739 B |
BIN
models/DemoFace_OuchRight.png
Normal file
BIN
models/DemoFace_OuchRight.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 739 B |
|
|
@ -88,7 +88,7 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
{
|
||||
TextureID StatusTex, WeaponTex, ScoreTex, InventoryTex, ChatTex[6],
|
||||
HealthTex[9], FuelTex[2], DashTex, EnemyBTex, EnemyHTex[7],
|
||||
GenericAmmoTex[3], AmmoTex[3], MiniBox[2], bgtex, FaceTex[19];
|
||||
GenericAmmoTex[3], AmmoTex[3], MiniBox[2], bgtex, FaceTex[21];
|
||||
|
||||
Font mSmallFont, mSmallFontOutline, mSmallFontOutlineAlt, mTinyFont, mTinyFontOutline, mTinyFontOutlineAlt, MiniHUDFont, MiniHUDFontOutline;
|
||||
int mhudfontcol[NUM_MINIHUD_COLOR];
|
||||
|
|
@ -311,14 +311,16 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
FaceTex[8] = TexMan.CheckForTexture("graphics/HUD/DemoFace_HurtLeft.png");
|
||||
FaceTex[9] = TexMan.CheckForTexture("graphics/HUD/DemoFace_HurtRight.png");
|
||||
FaceTex[10] = TexMan.CheckForTexture("graphics/HUD/DemoFace_Ouch.png");
|
||||
FaceTex[11] = TexMan.CheckForTexture("graphics/HUD/DemoFace_Dead.png");
|
||||
FaceTex[12] = TexMan.CheckForTexture("graphics/HUD/DemoFace_Smug.png");
|
||||
FaceTex[13] = TexMan.CheckForTexture("graphics/HUD/DemoFace_Angery.png");
|
||||
FaceTex[14] = TexMan.CheckForTexture("graphics/HUD/DemoFace_Barrier.png");
|
||||
FaceTex[15] = TexMan.CheckForTexture("graphics/HUD/DemoFace_Rage.png");
|
||||
FaceTex[16] = TexMan.CheckForTexture("graphics/HUD/DemoFace_Angerage.png");
|
||||
FaceTex[17] = TexMan.CheckForTexture("graphics/HUD/DemoFace_Sad.png");
|
||||
FaceTex[18] = TexMan.CheckForTexture("graphics/HUD/DemoFace_Wink.png");
|
||||
FaceTex[11] = TexMan.CheckForTexture("graphics/HUD/DemoFace_OuchLeft.png");
|
||||
FaceTex[12] = TexMan.CheckForTexture("graphics/HUD/DemoFace_OuchRight.png");
|
||||
FaceTex[13] = TexMan.CheckForTexture("graphics/HUD/DemoFace_Dead.png");
|
||||
FaceTex[14] = TexMan.CheckForTexture("graphics/HUD/DemoFace_Smug.png");
|
||||
FaceTex[15] = TexMan.CheckForTexture("graphics/HUD/DemoFace_Angery.png");
|
||||
FaceTex[16] = TexMan.CheckForTexture("graphics/HUD/DemoFace_Barrier.png");
|
||||
FaceTex[17] = TexMan.CheckForTexture("graphics/HUD/DemoFace_Rage.png");
|
||||
FaceTex[18] = TexMan.CheckForTexture("graphics/HUD/DemoFace_Angerage.png");
|
||||
FaceTex[19] = TexMan.CheckForTexture("graphics/HUD/DemoFace_Sad.png");
|
||||
FaceTex[20] = TexMan.CheckForTexture("graphics/HUD/DemoFace_Wink.png");
|
||||
// other expressions will be added when needed
|
||||
mSmallFont = Font.GetFont('TewiFont');
|
||||
mSmallFontOutline = Font.GetFont('TewiFontOutline');
|
||||
|
|
|
|||
|
|
@ -81,14 +81,14 @@ extend Class SWWMStatusBar
|
|||
let paindir = demo.paindir;
|
||||
let facetimer = demo.facetimer;
|
||||
let blinktime = demo.blinktime;
|
||||
if ( CPlayer.Health <= 0 ) return 11;
|
||||
if ( (isInvulnerable() || demo.FindInventory('InvinciballPower')) && (facestate >= FS_PAIN) ) return 12;
|
||||
if ( facestate == FS_OUCH ) return 10;
|
||||
if ( CPlayer.Health <= 0 ) return 13;
|
||||
if ( (isInvulnerable() || demo.FindInventory('InvinciballPower')) && (facestate >= FS_PAIN) ) return 14;
|
||||
if ( facestate == FS_OUCH ) return (paindir==1)?11:(paindir==-1)?12:10;
|
||||
if ( facestate == FS_PAIN ) return (paindir==1)?8:(paindir==-1)?9:7;
|
||||
if ( facestate == FS_GRIN ) return 5;
|
||||
if ( facestate == FS_EVIL ) return 6;
|
||||
if ( facestate == FS_SAD ) return 17;
|
||||
if ( facestate == FS_WINK ) return 18;
|
||||
if ( facestate == FS_SAD ) return 19;
|
||||
if ( facestate == FS_WINK ) return 20;
|
||||
if ( facestate == FS_BLINK ) return ((facetimer>28)||(facetimer<2))?3:4;
|
||||
switch ( blinktime )
|
||||
{
|
||||
|
|
@ -100,7 +100,7 @@ extend Class SWWMStatusBar
|
|||
return 4;
|
||||
break;
|
||||
}
|
||||
return (CPlayer.Health<=25)?17:2;
|
||||
return (CPlayer.Health<=25)?19:2;
|
||||
}
|
||||
|
||||
private void DrawMugshot()
|
||||
|
|
@ -118,9 +118,9 @@ extend Class SWWMStatusBar
|
|||
Screen.DrawTexture(FaceTex[0],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_SrcWidth,32,DTA_SrcHeight,32,DTA_DestWidth,32,DTA_DestHeight,32,DTA_SrcX,32*(facecol%4),DTA_SrcY,32*(facecol/4));
|
||||
bool raging = CPlayer.mo.FindInventory('RagekitPower');
|
||||
bool angy = CPlayer.mo.FindInventory('AngeryPower');
|
||||
if ( raging && angy ) Screen.DrawTexture(FaceTex[16],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
else if ( raging ) Screen.DrawTexture(FaceTex[15],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
else if ( angy ) Screen.DrawTexture(FaceTex[13],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
if ( raging && angy ) Screen.DrawTexture(FaceTex[18],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
else if ( raging ) Screen.DrawTexture(FaceTex[17],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
else if ( angy ) Screen.DrawTexture(FaceTex[15],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawTexture(FaceTex[1],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Color,Color(255,255,0,0),DTA_Alpha,min(1.,noiz));
|
||||
if ( (CPlayer.Health > 0) && (isInvulnerable() || CPlayer.mo.FindInventory('InvinciballPower')) )
|
||||
Screen.DrawTexture(FaceTex[1],false,xmargin+shake.x,ss.y-(ymargin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,.8+.1*sin(gametic+fractic));
|
||||
|
|
|
|||
|
|
@ -44,18 +44,23 @@ extend Class Demolitionist
|
|||
// damage handling
|
||||
if ( facedamage )
|
||||
{
|
||||
bool setpaindir = false;
|
||||
if ( lastdamage > 70 )
|
||||
{
|
||||
facestate = FS_OUCH;
|
||||
facetimer = (lastdamagetimer-gametic)+10;
|
||||
setpaindir = true;
|
||||
paindir = 0;
|
||||
}
|
||||
else if ( facestate < FS_OUCH )
|
||||
{
|
||||
facestate = FS_PAIN;
|
||||
facetimer = (lastdamagetimer-gametic)+10;
|
||||
setpaindir = true;
|
||||
paindir = 0;
|
||||
}
|
||||
// paraphrased from vanilla, with some tweaks
|
||||
if ( player.attacker && (player.attacker != self) )
|
||||
if ( setpaindir && player.attacker && (player.attacker != self) )
|
||||
{
|
||||
double atkang = AngleTo(player.attacker);
|
||||
double angdiff = deltaangle(angle,atkang);
|
||||
|
|
@ -66,7 +71,6 @@ extend Class Demolitionist
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
facedamage = false;
|
||||
if ( facegrin && (facestate < FS_SAD) )
|
||||
{
|
||||
|
|
@ -125,8 +129,8 @@ extend Class Demolitionist
|
|||
"Blank", "Blink", "Booty", "Dead",
|
||||
"Default", "Dizzy", "Evil", "Grin",
|
||||
"Hurt", "HurtLeft", "HurtRight",
|
||||
"Off", "Ouch", "Sad", "Smug",
|
||||
"Unamused", "Wink"
|
||||
"Off", "Ouch", "OuchLeft", "OuchRight",
|
||||
"Sad", "Smug", "Unamused", "Wink"
|
||||
};
|
||||
int faceidx = GetFaceTex();
|
||||
if ( !oldfaceidx || (faceidx != oldfaceidx) )
|
||||
|
|
@ -137,14 +141,14 @@ extend Class Demolitionist
|
|||
private int GetFaceTex()
|
||||
{
|
||||
if ( player.Health <= 0 ) return 3;
|
||||
if ( (bInvulnerable || (player.cheats&(CF_GODMODE|CF_GODMODE2)) || FindInventory('InvinciballPower')) && (facestate >= FS_PAIN) ) return 14;
|
||||
if ( facestate == FS_OUCH ) return 12;
|
||||
if ( (bInvulnerable || (player.cheats&(CF_GODMODE|CF_GODMODE2)) || FindInventory('InvinciballPower')) && (facestate >= FS_PAIN) ) return 16;
|
||||
if ( facestate == FS_OUCH ) return (paindir==1)?14:(paindir==-1)?13:12;
|
||||
if ( facestate == FS_PAIN ) return (paindir==1)?10:(paindir==-1)?9:8;
|
||||
if ( facestate == FS_GRIN ) return 7;
|
||||
if ( facestate == FS_EVIL ) return 6;
|
||||
if ( facestate == FS_SAD ) return 13;
|
||||
if ( facestate == FS_WINK ) return 16;
|
||||
if ( facestate == FS_BLINK ) return ((facetimer>28)||(facetimer<2))?15:1;
|
||||
if ( facestate == FS_SAD ) return 15;
|
||||
if ( facestate == FS_WINK ) return 18;
|
||||
if ( facestate == FS_BLINK ) return ((facetimer>28)||(facetimer<2))?17:1;
|
||||
switch ( blinktime )
|
||||
{
|
||||
case -1:
|
||||
|
|
@ -155,6 +159,6 @@ extend Class Demolitionist
|
|||
return 1;
|
||||
break;
|
||||
}
|
||||
return (player.Health<=25)?13:4;
|
||||
return (player.Health<=25)?15:4;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue