Browse Source

add an effect when wanderer or thoth gets damaged

master
Alison Watson 2 months ago
parent
commit
d996d9391a
7 changed files with 21 additions and 0 deletions
  1. BIN
      pk7/acs/lithmain.bin
  2. +1
    -0
      pk7/lzscript/Constants/p_player.zsc
  3. +9
    -0
      pk7/lzscript/Player/Base.zsc
  4. +5
    -0
      pk7/lzscript/Weapons/Base.zsc
  5. +4
    -0
      pk7/trnslate.txt
  6. +1
    -0
      source/include/p_player.h
  7. +1
    -0
      source/w_data.c

BIN
pk7/acs/lithmain.bin View File


+ 1
- 0
pk7/lzscript/Constants/p_player.zsc View File

@@ -28,6 +28,7 @@ enum Lith_PData {
pdata_recoilp,
pdata_attr,
pdata_alpha,
pdata_oldhealth,
};

enum Lith_SubweaponType {


+ 9
- 0
pk7/lzscript/Player/Base.zsc View File

@@ -51,6 +51,8 @@ double m_VZVel, m_LastVZVel;
Lith_MapMarker m_curMark;
Lith_AdviceMarker m_curAdvice;

int m_wasDamaged;

property ViewBob: m_VBob;

override void BeginPlay() {
@@ -185,6 +187,13 @@ int, int, bool Lith_Unproject(vector3 loc) {
}

void Lith_PreTick() {
if(m_wasDamaged) {
--m_wasDamaged;
} else if(Lith_UTIL.pData(self, pdata_pclass) & (pcl_wanderer | pcl_thoth) &&
health < Lith_UTIL.pData(self, pdata_oldhealth)) {
m_wasDamaged = 7;
}

if(!m_wasFrozen && isFrozen()) {
if(player.psprites) player.psprites.tics = -1;
viewBob = 0;


+ 5
- 0
pk7/lzscript/Weapons/Base.zsc View File

@@ -124,6 +124,11 @@ action(Weapon) void lith_a_setupOverlays() {
a_overlayFlags(psp, pspf_alpha|pspf_renderstyle, true);
a_overlayRenderStyle(psp, style);
a_overlayAlpha(psp, a);
if(Lith_Player(self).m_wasDamaged) {
a_overlayTranslation(psp, "Lith_FuckUp" .. random(1, 4));
} else {
a_overlayTranslation(psp, '');
}
}
}



+ 4
- 0
pk7/trnslate.txt View File

@@ -34,5 +34,9 @@ Lith_VoidShot = "0:255=%[0,0,0]:[0.8,0.1,0.75]"
Lith_WeapGlow = "112:127=197:207", "224:231=192:199"
Lith_WeapGlowBright = "112:127=192:207", "224:231=192:194"
Lith_BlueBaron = "16:47=%[0.20,0.21,0.38]:[0.48,1.10,1.73]"
Lith_FuckUp1 = "16:47=112:112", "48:83=172:172", "1:15=195:195", "84:114=215:215", "115:151=161:161", "152:173=114:114", "174:210=193:193", "211:229=250:250", "230:249=251:251", "250:254=171:171", "0:0=4:4"
Lith_FuckUp2 = "16:47=170:170", "48:83=112:112", "1:15=227:227", "84:114=250:250", "115:151=17:17", "152:173=211:211", "174:210=173:173", "211:229=195:195", "230:249=193:193", "4:4=0:0"
Lith_FuckUp3 = "16:47=192:192", "48:83=250:250", "1:15=171:171", "84:114=227:227", "115:151=112:112", "152:173=212:212", "174:210=193:193", "211:229=173:173", "230:249=252:252", "0:0=4:4"
Lith_FuckUp4 = "16:47=175:175", "48:83=198:198", "1:15=115:115", "84:114=214:214", "115:151=251:251", "152:173=49:49", "174:210=231:231", "211:229=232:232", "230:249=240:240"

/* EOF */

+ 1
- 0
source/include/p_player.h View File

@@ -64,6 +64,7 @@ enum ZscName(PData) {
pdata_recoilp,
pdata_attr,
pdata_alpha,
pdata_oldhealth,
};

enum ZscName(SubweaponType) {


+ 1
- 0
source/w_data.c View File

@@ -36,6 +36,7 @@ i32 Sc_LPData(i32 info, i32 permutation)
case pdata_recoilp: return u.k = p->extrpitch, u.i;
case pdata_attr: return p->attr.attrs[permutation];
case pdata_alpha: return u.k = p->alpha, u.i;
case pdata_oldhealth: return p->oldhealth;
}

return 0;


Loading…
Cancel
Save