Small things.

- Swap all instances of Thinker.TICRATE with the GameTicRate global.
 - Force intermission counters to be enabled (fuck Heretic).
 - Add two more achievements to be used.
This commit is contained in:
Mari the Deer 2021-01-26 15:20:34 +01:00
commit da9086d253
16 changed files with 103 additions and 92 deletions

View file

@ -170,6 +170,8 @@ nosave int swwm_achievement_hnd = 0;
nosave int swwm_achievement_gepgun = 0;
nosave int swwm_achievement_fuller = 0;
nosave int swwm_achievement_pene = 0;
nosave int swwm_achievement_acid = 0;
nosave int swwm_achievement_salt = 0;
nosave int swwm_achievement_tetris = 0;
nosave int swwm_achievement_pong = 0;
nosave int swwm_achievement_snake = 0;
@ -215,3 +217,4 @@ nosave int swwm_progress_jump = 0;
nosave int swwm_progress_roast = 0;
nosave int swwm_progress_dab = 0;
nosave int swwm_progress_gepgun = 0;
nosave int swwm_progress_acid = 0;

View file

@ -1219,6 +1219,10 @@ SWWM_ACHIEVEMENT_FULLER_TAG = "You Gained Brouzouf";
SWWM_ACHIEVEMENT_FULLER_TXT = "Unload an entire mag in fuller auto with the Puntzer Gamma without missing a single shot";
SWWM_ACHIEVEMENT_PENE_TAG = "Penetrator";
SWWM_ACHIEVEMENT_PENE_TXT = "Strike through %d enemies in a row with a single Grand Lance secondary";
SWWM_ACHIEVEMENT_ACID_TAG = "Fizzy Goodness";
SWWM_ACHIEVEMENT_ACID_TXT = "Melt %d enemies with Telubrium Flechettes";
SWWM_ACHIEVEMENT_SALT_TAG = "Maximum Oversalt";
SWWM_ACHIEVEMENT_SALT_TXT = "Shoot 25 Saltshot rounds simultaneously";
SWWM_ACHIEVEMENT_TETRIS_TAG = "Tetromination";
SWWM_ACHIEVEMENT_TETRIS_TXT = "Complete a full game of Tetris";
SWWM_ACHIEVEMENT_PONG_TAG = "Danny Won, Yeah";

View file

@ -1135,6 +1135,10 @@ SWWM_ACHIEVEMENT_FULLER_TAG = "Has Ganado Brouzouf";
SWWM_ACHIEVEMENT_FULLER_TXT = "Vacía un cargador entero en super-automático con el Puntzer Gamma sin fallar un solo disparo";
SWWM_ACHIEVEMENT_PENE_TAG = "Penetrador";
SWWM_ACHIEVEMENT_PENE_TXT = "Atraviesa %d enemigos en fila con un solo secundario de la Gran Lanza";
SWWM_ACHIEVEMENT_ACID_TAG = "La Buena Efervescencia";
SWWM_ACHIEVEMENT_ACID_TXT = "Derrite %d enemigos con Flechettes de Telubrium";
SWWM_ACHIEVEMENT_SALT_TAG = "Sobresalado Máximo";
SWWM_ACHIEVEMENT_SALT_TXT = "Dispara 25 cartuchos de sal al mismo tiempo";
SWWM_ACHIEVEMENT_TETRIS_TAG = "Tetrominación";
SWWM_ACHIEVEMENT_TETRIS_TXT = "Completa una partida entera de Tetris";
SWWM_ACHIEVEMENT_PONG_TAG = "Danny Ganó, Yeah";

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r234 \cu(Mon 25 Jan 22:22:48 CET 2021)\c-";
SWWM_SHORTVER="\cw0.9.11b-pre r234 \cu(2021-01-25 22:22:48)\c-";
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r235 \cu(Tue 26 Jan 15:20:34 CET 2021)\c-";
SWWM_SHORTVER="\cw0.9.11b-pre r235 \cu(2021-01-26 15:20:34)\c-";

View file

@ -28,6 +28,7 @@ GameInfo
MenuFontColor_Highlight = "Sapphire"
MenuFontColor_Selection = "Sapphire"
MenuSliderColor = "Green"
MenuSliderBackColor = "DarkGray"
MenuBackButton = "graphics/swwmback.png"
MessageBoxClass = "SWWMMessageBox"
PauseSign = "graphics/swwmpause.png"
@ -35,6 +36,7 @@ GameInfo
Border = 2, 0, "graphics/bord_tr.png", "graphics/bord_t.png", "graphics/bord_tl.png", "graphics/bord_r.png", "graphics/bord_l.png", "graphics/bord_br.png", "graphics/bord_b.png", "graphics/bord_bl.png"
ForceTextInMenus = true
TelefogHeight = 28
IntermissionCounter = true // fuck you Heretic
// precaching of frame-heavy objects
PrecacheClasses = "Demolitionist", // player
// weapons

View file

@ -356,7 +356,7 @@ Class SWWMCreditsMenu : GenericMenu
}
override void Ticker()
{
spos -= speed/Thinker.TICRATE;
spos -= speed/GameTicRate;
if ( spos < -theight ) spos = ss.y;
if ( spos > ss.y ) spos = -theight;
cdev[0].Ticker();

View file

@ -2377,7 +2377,7 @@ Class YnykronSingularity : Actor
{
// v-force field compression (very rough approximation)
a.vel *= max(.0,1.-.03*(grav*grav)/(MION_CONST*MION_CONST));
a.vel += dirto*grav/(capmass*TICRATE);
a.vel += dirto*grav/(capmass*GameTicRate);
}
}
}

View file

@ -257,7 +257,7 @@ Class DeepImpact : SWWMWeapon
action void A_ChargeUp()
{
invoker.charge += 1./TICRATE;
invoker.charge += 1./GameTicRate;
A_WeaponOffset(FRandom[Impact](-1,1)*invoker.charge,32+FRandom[Impact](-1,1)*invoker.charge);
if ( invoker.charge >= (invoker.clipcount*.01) )
{

View file

@ -565,7 +565,7 @@ Class SWWMHandler : EventHandler
hnd.oneliner = String.Format("$SWWM_SUBS_%s_%s%d",voicetype.MakeUpper(),type.MakeUpper(),whichline);
hnd.onelinersnd = String.Format("voice/%s/%s%d",voicetype,type,whichline);
hnd.onelinertic = gametic+delay;
hnd.onelinerspan = int(S_GetLength(hnd.onelinersnd)*Thinker.TICRATE);
hnd.onelinerspan = int(S_GetLength(hnd.onelinersnd)*GameTicRate);
hnd.onelinerlevel = level;
return hnd.onelinertic+hnd.onelinerspan;
}
@ -1545,7 +1545,7 @@ Class SWWMHandler : EventHandler
if ( e.Thing.IsFriend(src) || (!e.Thing.default.bCountKill && !(e.Thing is 'ScriptedMarine')) )
return;
int pnum = src.PlayerNumber();
if ( level.maptime < (lastkill[pnum]+5*Thinker.TICRATE) )
if ( level.maptime < (lastkill[pnum]+5*GameTicRate) )
multilevel[pnum]++;
else multilevel[pnum] = 0;
if ( s && (multilevel[pnum]+1 > s.mkill) )
@ -3339,7 +3339,7 @@ Class SWWMHandler : EventHandler
{
Shader.SetEnabled(p,"RagekitShader",false);
Shader.SetEnabled(p,"RagekitAltShader",true);
Shader.SetUniform1f(p,"RagekitAltShader","timer",(gametic+e.FracTic)/Thinker.TICRATE);
Shader.SetUniform1f(p,"RagekitAltShader","timer",(gametic+e.FracTic)/GameTicRate);
double xstrastr = 1.+max(0,rage.lastpulse-(gametic+e.Fractic))/35.;
Shader.SetUniform1f(p,"RagekitAltShader","xtrastr",xstrastr**2.);
}
@ -3347,7 +3347,7 @@ Class SWWMHandler : EventHandler
{
Shader.SetEnabled(p,"RagekitAltShader",false);
Shader.SetEnabled(p,"RagekitShader",true);
Shader.SetUniform1f(p,"RagekitShader","timer",(gametic+e.FracTic)/Thinker.TICRATE);
Shader.SetUniform1f(p,"RagekitShader","timer",(gametic+e.FracTic)/GameTicRate);
double xstrastr = 1.+max(0,rage.lastpulse-(gametic+e.Fractic))/35.;
Shader.SetUniform1f(p,"RagekitShader","xtrastr",xstrastr**2.);
}
@ -3372,7 +3372,7 @@ Class SWWMHandler : EventHandler
if ( pc && coat && useshaders.GetBool() )
{
Shader.SetEnabled(p,"BarrierShader",true);
Shader.SetUniform1f(p,"BarrierShader","timer",(gametic+e.FracTic)/Thinker.TICRATE);
Shader.SetUniform1f(p,"BarrierShader","timer",(gametic+e.FracTic)/GameTicRate);
}
else Shader.SetEnabled(p,"BarrierShader",false);
if ( pc && (mo is 'Demolitionist') && useshaders.GetBool() )
@ -3381,7 +3381,7 @@ Class SWWMHandler : EventHandler
if ( demo.lastunder == Demolitionist.UNDER_WATER )
{
Shader.SetEnabled(p,"WaterWarp",true);
Shader.SetUniform1f(p,"WaterWarp","timer",(gametic+e.FracTic)/Thinker.TICRATE);
Shader.SetUniform1f(p,"WaterWarp","timer",(gametic+e.FracTic)/GameTicRate);
Shader.SetUniform1f(p,"WaterWarp","dfact",coat?.25:1.);
Shader.SetUniform3f(p,"WaterWarp","lightcol",(demo.undercol.r/255.,demo.undercol.g/255.,demo.undercol.b/255.));
@ -3390,7 +3390,7 @@ Class SWWMHandler : EventHandler
if ( demo.lastunder == Demolitionist.UNDER_LAVA )
{
Shader.SetEnabled(p,"LavaWarp",true);
Shader.SetUniform1f(p,"LavaWarp","timer",(gametic+e.FracTic)/Thinker.TICRATE);
Shader.SetUniform1f(p,"LavaWarp","timer",(gametic+e.FracTic)/GameTicRate);
Shader.SetUniform1f(p,"LavaWarp","dfact",coat?.25:1.);
Shader.SetUniform3f(p,"LavaWarp","lightcol",(demo.undercol.r/255.,demo.undercol.g/255.,demo.undercol.b/255.));
}
@ -3398,7 +3398,7 @@ Class SWWMHandler : EventHandler
if ( demo.lastunder == Demolitionist.UNDER_SLIME )
{
Shader.SetEnabled(p,"SlimeWarp",true);
Shader.SetUniform1f(p,"SlimeWarp","timer",(gametic+e.FracTic)/Thinker.TICRATE);
Shader.SetUniform1f(p,"SlimeWarp","timer",(gametic+e.FracTic)/GameTicRate);
Shader.SetUniform1f(p,"SlimeWarp","dfact",coat?.25:1.);
Shader.SetUniform3f(p,"SlimeWarp","lightcol",(demo.undercol.r/255.,demo.undercol.g/255.,demo.undercol.b/255.));
}
@ -3410,8 +3410,8 @@ Class SWWMHandler : EventHandler
Shader.SetEnabled(p,"Grain",noiz>0);
if ( noiz > 0 )
{
Shader.SetUniform1f(p,"Glitch","Timer",(gametic+e.FracTic)/Thinker.TICRATE);
Shader.SetUniform1f(p,"Grain","Timer",(gametic+e.FracTic)/Thinker.TICRATE);
Shader.SetUniform1f(p,"Glitch","Timer",(gametic+e.FracTic)/GameTicRate);
Shader.SetUniform1f(p,"Grain","Timer",(gametic+e.FracTic)/GameTicRate);
Shader.SetUniform1f(p,"Grain","ni",noiz);
noiz = min(lastdmg*.08*max(0,(lastdmgtic-(gametic+e.Fractic))/35.),.8);
Shader.SetUniform1f(p,"Glitch","str1",noiz);

View file

@ -42,7 +42,7 @@ Class SWWMHelpMenu : GenericMenu
override bool MenuEvent( int mkey, bool fromcontroller )
{
double alph = clamp((gametic-fadetic)*(5./Thinker.TICRATE),0.,1.);
double alph = clamp((gametic-fadetic)*(5./GameTicRate),0.,1.);
switch ( mkey )
{
case MKEY_Enter:
@ -213,7 +213,7 @@ Class SWWMHelpMenu : GenericMenu
else hs = max(min(floor(Screen.GetWidth()/640.),floor(Screen.GetHeight()/266.)),1.);
Vector2 ss = (Screen.GetWidth(),Screen.GetHeight())/hs;
Vector2 origin = (ss.x-640,ss.y-266)/2.;
double alph = clamp((gametic-fadetic)*(5./Thinker.TICRATE),0.,1.);
double alph = clamp((gametic-fadetic)*(5./GameTicRate),0.,1.);
if ( (prevpage == -1) || (alph >= 1.) ) DrawPage(curpage,ss,origin);
else
{

View file

@ -960,7 +960,7 @@ Class SWWMStatusBar : BaseStatusBar
if ( i is 'Powerup' )
{
Screen.DrawTexture(i.Icon,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_Alpha,Powerup(i).IsBlinking()?alpha*.5:alpha,DTA_TopOffset,0,DTA_LeftOffset,0);
String nstr = String.Format("%ds",Powerup(i).EffectTics/Thinker.TICRATE);
String nstr = String.Format("%ds",Powerup(i).EffectTics/GameTicRate);
int len = mTewiFont.mFont.StringWidth(nstr);
Screen.DrawText(mTewiFont.mFont,Font.CR_FIRE,(xx+30)-len,(yy+30)-11,nstr,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,Powerup(i).IsBlinking()?alpha*.5:alpha);
return;

View file

@ -268,32 +268,30 @@ Class SWWMStatScreen : StatusScreen abstract
for ( int i=0; i < MAXPLAYERS; i++ )
{
if ( !playeringame[i] ) continue;
PlayerInfo p = players[i];
if ( (p.cmd.buttons^p.oldbuttons) && ((p.cmd.buttons&p.oldbuttons) == p.oldbuttons) && !p.Bot )
{
PlayerInfo p = players[i];
if ( (p.cmd.buttons^p.oldbuttons) && ((p.cmd.buttons&p.oldbuttons) == p.oldbuttons) && !p.Bot )
if ( p.cmd.buttons&(BT_ATTACK|BT_USE) )
{
if ( p.cmd.buttons&(BT_ATTACK|BT_USE) )
acceleratestage = 1;
playerready[i] = true;
}
if ( i == me )
{
if ( p.cmd.buttons&BT_RELOAD )
{
acceleratestage = 1;
playerready[i] = true;
PlaySound("menu/demoscroll");
whichtip = 0;
}
if ( i == consoleplayer )
if ( p.cmd.buttons&BT_ZOOM )
{
if ( p.cmd.buttons&BT_RELOAD )
{
PlaySound("menu/demoscroll");
whichtip = 0;
}
if ( p.cmd.buttons&BT_ZOOM )
{
PlaySound("menu/demoscroll");
whichart = 0;
arttex.SetNull();
}
PlaySound("menu/demoscroll");
whichart = 0;
arttex.SetNull();
}
}
p.oldbuttons = p.buttons;
}
p.oldbuttons = p.buttons;
}
}
override void Ticker( void )
@ -317,8 +315,8 @@ Class SWWMStatScreen : StatusScreen abstract
break;
}
// check fade
if ( players[consoleplayer].cmd.buttons&BT_ALTATTACK ) bgfade = min(1.,bgfade+3./Thinker.TICRATE);
else bgfade = max(0.,bgfade-4./Thinker.TICRATE);
if ( players[me].cmd.buttons&BT_ALTATTACK ) bgfade = min(1.,bgfade+3./GameTicRate);
else bgfade = max(0.,bgfade-4./GameTicRate);
}
protected String TimeStr( int secs )
{
@ -350,7 +348,7 @@ Class SWWMStatScreen_SP : SWWMStatScreen
sp_state = 1;
cnt_kills[0] = cnt_items[0] = cnt_secret[0] = -1;
cnt_time = cnt_par = -1;
cnt_pause = Thinker.TICRATE;
cnt_pause = GameTicRate;
cnt_total_time = -1;
}
@ -365,7 +363,7 @@ Class SWWMStatScreen_SP : SWWMStatScreen
cnt_items[0] = Plrs[me].sitems;
cnt_secret[0] = Plrs[me].ssecret;
cnt_time = Thinker.Tics2Seconds(Plrs[me].stime);
cnt_par = wbs.partime/Thinker.TICRATE;
cnt_par = wbs.partime/GameTicRate;
cnt_total_time = Thinker.Tics2Seconds(wbs.totaltime);
}
if ( sp_state == 2 )
@ -414,7 +412,7 @@ Class SWWMStatScreen_SP : SWWMStatScreen
{
int sec = Thinker.Tics2Seconds(Plrs[me].stime);
int tsec = Thinker.Tics2Seconds(wbs.totaltime);
int psec = wbs.partime/Thinker.TICRATE;
int psec = wbs.partime/GameTicRate;
if ( intermissioncounter )
{
if ( !(bcnt%2) ) PlaySound("menu/demoscroll");
@ -450,7 +448,7 @@ Class SWWMStatScreen_SP : SWWMStatScreen
if ( !--cnt_pause )
{
sp_state++;
cnt_pause = Thinker.TICRATE;
cnt_pause = GameTicRate;
}
}
}
@ -522,7 +520,7 @@ Class SWWMStatScreen_SP : SWWMStatScreen
}
if ( wbs.partime )
{
str = TimeStr(wbs.partime/Thinker.TICRATE);
str = TimeStr(wbs.partime/GameTicRate);
len = fnt.StringWidth(str);
if ( len > maxlenr ) maxlenr = len;
}
@ -606,7 +604,7 @@ Class SWWMStatScreen_SP : SWWMStatScreen
{
str = TimeStr(cnt_time);
len = fnt.StringWidth(str);
Screen.DrawText(fnt,(wbs.partime&&(cnt_time<=(wbs.partime/Thinker.TICRATE)))?Font.CR_GOLD:((wbs.sucktime>0)&&(cnt_time>(wbs.sucktime*3600)))?Font.CR_RED:Font.CR_WHITE,xx-len,yy,str,DTA_VirtualWidthF,ss2.x,DTA_VirtualHeightF,ss2.y,DTA_KeepRatio,true);
Screen.DrawText(fnt,(wbs.partime&&(cnt_time<=(wbs.partime/GameTicRate)))?Font.CR_GOLD:((wbs.sucktime>0)&&(cnt_time>(wbs.sucktime*3600)))?Font.CR_RED:Font.CR_WHITE,xx-len,yy,str,DTA_VirtualWidthF,ss2.x,DTA_VirtualHeightF,ss2.y,DTA_KeepRatio,true);
}
yy += step;
if ( wi_showtotaltime )
@ -635,7 +633,7 @@ Class SWWMStatScreen_Coop : SWWMStatScreen
CurState = StatCount;
acceleratestage = 0;
ng_state = 1;
cnt_pause = Thinker.TICRATE;
cnt_pause = GameTicRate;
for ( int i=0; i<MAXPLAYERS; i++ )
{
playerready[i] = false;
@ -755,7 +753,7 @@ Class SWWMStatScreen_Coop : SWWMStatScreen
if ( !--cnt_pause )
{
ng_state++;
cnt_pause = Thinker.TICRATE;
cnt_pause = GameTicRate;
}
}
}
@ -818,7 +816,7 @@ Class SWWMStatScreen_Coop : SWWMStatScreen
xx += pad;
if ( playerready[i] || players[i].Bot ) Screen.DrawChar(TewiFont,Font.CR_GREEN,xx,yy+ryofs,checkmark,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
xx += rwidth;
Screen.DrawText(fnt,GetRowColor(players[i],i==consoleplayer),xx,yy,players[i].GetUserName(),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
Screen.DrawText(fnt,GetRowColor(players[i],i==me),xx,yy,players[i].GetUserName(),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
xx += namelen+spc;
if ( ng_state >= 4 )
{
@ -892,7 +890,7 @@ Class SWWMStatScreen_DM : SWWMStatScreen
total_frags = 0;
total_deaths = 0;
ng_state = 1;
cnt_pause = Thinker.TICRATE;
cnt_pause = GameTicRate;
for ( int i=0; i<MAXPLAYERS; i++ )
{
if ( !playeringame[i] ) continue;
@ -977,7 +975,7 @@ Class SWWMStatScreen_DM : SWWMStatScreen
if ( !--cnt_pause )
{
ng_state++;
cnt_pause = Thinker.TICRATE;
cnt_pause = GameTicRate;
}
}
}
@ -1034,7 +1032,7 @@ Class SWWMStatScreen_DM : SWWMStatScreen
xx += pad;
if ( playerready[i] || players[i].Bot ) Screen.DrawChar(TewiFont,Font.CR_GREEN,xx,yy+ryofs,checkmark,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
xx += rwidth;
Screen.DrawText(fnt,GetRowColor(players[i],i==consoleplayer),xx,yy,players[i].GetUserName(),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
Screen.DrawText(fnt,GetRowColor(players[i],i==me),xx,yy,players[i].GetUserName(),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
xx += namelen+spc;
if ( ng_state >= 2 )
{

View file

@ -325,7 +325,7 @@ Class DemolitionistMenu : GenericMenu
static const int days_in_month[] = {31,28,31,30,31,30,31,31,30,31,30,31};
bool leap_year;
int y = c_year, m = c_month, d = c_day, h = c_hour, mn = c_minute;
int addtime = level.totaltime/Thinker.TICRATE;
int addtime = level.totaltime/GameTicRate;
while ( addtime > 0 )
{
leap_year = (!(y%4) && ((y%100) || !(y%400)));
@ -2431,9 +2431,9 @@ Class DemolitionistMenu : GenericMenu
{
statlist.Clear();
// wish I could use macros for this
int thour = ((level.totaltime-stats.lastspawn)/(3600*Thinker.TICRATE));
int tmin = ((level.totaltime-stats.lastspawn)/(60*Thinker.TICRATE))%60;
int tsec = ((level.totaltime-stats.lastspawn)/Thinker.TICRATE)%60;
int thour = ((level.totaltime-stats.lastspawn)/(3600*GameTicRate));
int tmin = ((level.totaltime-stats.lastspawn)/(60*GameTicRate))%60;
int tsec = ((level.totaltime-stats.lastspawn)/GameTicRate)%60;
String str = String.Format("\cx%s\c-%02d\cu:\c-%02d\cu:\c-%02d",StringTable.Localize("$SWWM_STATUPTIME"),thour,tmin,tsec);
statlist.Push(str);
if ( stats.grounddist > 32000. ) str = String.Format("\cx%s\c-%g\cu%s\c-",StringTable.Localize("$SWWM_STATONFOOT"),stats.grounddist/32000.,StringTable.Localize("$SWWM_UNIT_KILOMETER"));
@ -2456,11 +2456,11 @@ Class DemolitionistMenu : GenericMenu
statlist.Push(str);
str = String.Format("\cx%s\c-%g\cu%s\c-",StringTable.Localize("$SWWM_STATFUEL"),stats.fuelusage/60.,StringTable.Localize("$SWWM_UNIT_LITER"));
statlist.Push(str);
str = String.Format("\cx%s\c-%g\cu%s\c-",StringTable.Localize("$SWWM_STATSPEED"),stats.topspeed*32000./(3600*Thinker.TICRATE),StringTable.Localize("$SWWM_UNIT_KPH"));
str = String.Format("\cx%s\c-%g\cu%s\c-",StringTable.Localize("$SWWM_STATSPEED"),stats.topspeed*32000./(3600*GameTicRate),StringTable.Localize("$SWWM_UNIT_KPH"));
statlist.Push(str);
thour = (stats.airtime/(3600*Thinker.TICRATE));
tmin = (stats.airtime/(60*Thinker.TICRATE))%60;
tsec = (stats.airtime/Thinker.TICRATE)%60;
thour = (stats.airtime/(3600*GameTicRate));
tmin = (stats.airtime/(60*GameTicRate))%60;
tsec = (stats.airtime/GameTicRate)%60;
str = String.Format("\cx%s\c-%02d\cu:\c-%02d\cu:\c-%02d",StringTable.Localize("$SWWM_STATAIRTIME"),thour,tmin,tsec);
statlist.Push(str);
str = String.Format("\cx%s\c-%d",StringTable.Localize("$SWWM_STATWPONCH"),stats.wponch);
@ -3312,9 +3312,9 @@ Class DemolitionistMenu : GenericMenu
{
if ( yy >= 370 ) break;
let ent = tradelib.ent[tradelib.ent.Size()-(i+1)];
int thour = (ent.timestamp/(3600*Thinker.TICRATE));
int tmin = (ent.timestamp/(60*Thinker.TICRATE))%60;
int tsec = (ent.timestamp/Thinker.TICRATE)%60;
int thour = (ent.timestamp/(3600*GameTicRate));
int tmin = (ent.timestamp/(60*GameTicRate))%60;
int tsec = (ent.timestamp/GameTicRate)%60;
str = String.Format("\cu[\cc%02d\cu:\cc%02d\cu:\cc%02d\cu]\c- ",thour,tmin,tsec);
str.AppendFormat("\cd%s %s\cd: \cj%dx \cf%s\c-",ent.type?StringTable.Localize("$SWWM_TRADEFROM"):StringTable.Localize("$SWWM_TRADETO"),ent.other,ent.amt,GetDefaultByType(ent.what).GetTag());
Screen.DrawText(fnt,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
@ -3348,9 +3348,9 @@ Class DemolitionistMenu : GenericMenu
for ( int i=ofs; i>=0; i-- )
{
int col = (bar.FullHistory[i].type==PRINT_TEAMCHAT)?tcol.GetInt():ccol.GetInt();
int thour = (bar.FullHistory[i].tic/(3600*Thinker.TICRATE));
int tmin = (bar.FullHistory[i].tic/(60*Thinker.TICRATE))%60;
int tsec = (bar.FullHistory[i].tic/Thinker.TICRATE)%60;
int thour = (bar.FullHistory[i].tic/(3600*GameTicRate));
int tmin = (bar.FullHistory[i].tic/(60*GameTicRate))%60;
int tsec = (bar.FullHistory[i].tic/GameTicRate)%60;
str = String.Format("\cu[\c-%02d\cu:\c-%02d\cu:\c-%02d\cu]\c- ",thour,tmin,tsec);
BrokenLines l = fnt.BreakLines(bar.FullHistory[i].str,626-margin);
double by = yy-13*l.Count();

View file

@ -1182,7 +1182,7 @@ Class Demolitionist : PlayerPawn
}
else accel = z*player.cmd.upmove*8.;
accel *= fs/128.;
vel = vel+accel/TICRATE;
vel = vel+accel/GameTicRate;
if ( sendtoground ) vel.xy *= .6;
if ( (pos.z <= floorz) || bOnMobj ) sendtoground = false;
if ( vel.length() > 50. )
@ -1249,8 +1249,8 @@ Class Demolitionist : PlayerPawn
Vector3 accel = x*player.cmd.forwardmove+y*player.cmd.sidemove+z*jcmove;
accel *= fs/320.;
double spd = vel.length();
if ( spd > 40. ) vel = (vel+accel/TICRATE).unit()*spd;
else vel = vel+accel/TICRATE;
if ( spd > 40. ) vel = (vel+accel/GameTicRate).unit()*spd;
else vel = vel+accel/GameTicRate;
vel *= .97;
player.vel = (1,1)*vel.length();
player.jumptics = -2;
@ -1273,8 +1273,8 @@ Class Demolitionist : PlayerPawn
Vector3 accel = (RotateVector((player.cmd.forwardmove,-player.cmd.sidemove),angle),0);
accel *= fs/512.;
double spd = vel.length();
if ( spd > 10. ) vel = (vel+accel/TICRATE).unit()*spd;
else vel = vel+accel/TICRATE;
if ( spd > 10. ) vel = (vel+accel/GameTicRate).unit()*spd;
else vel = vel+accel/GameTicRate;
}
else if ( player.onground && !bNOGRAVITY && (waterlevel < 2) )
{
@ -1410,7 +1410,7 @@ Class Demolitionist : PlayerPawn
{
if ( !player.onground && (((walljump || wallclimb) && (level.maptime < last_kick+8)) || (!(walljump || wallclimb) && (level.maptime < last_boost+8))) )
return;
double jumpvelz = JumpZ*35./TICRATE;
double jumpvelz = JumpZ*35./GameTicRate;
double jumpfac = 0;
for ( let p=Inv; p; p=p.Inv )
{
@ -2886,7 +2886,7 @@ Class ReviveCooldown : Powerup
{
Super.InitEffect();
// adjust the duration
EffectTics = max(0,swwm_revivecooldown)*Thinker.TICRATE;
EffectTics = max(0,swwm_revivecooldown)*GameTicRate;
}
override void EndEffect()
{
@ -3170,7 +3170,7 @@ Class LoveHeart : Actor
{
special1++;
if ( !(special1%3) && (special2 > 0) ) special2--;
A_SetScale(.2+.02*sin(special1*.25*TICRATE));
A_SetScale(.2+.02*sin(special1*.25*GameTicRate));
double magvel = vel.length();
if ( magvel > 0 )
{
@ -3193,7 +3193,7 @@ Class LoveHeart : Actor
}
if ( !tracer || (tracer.Health <= 0) ) return;
double mag = vel.length();
vel = mag*(level.Vec3Diff(pos,tracer.Vec3Offset(0,0,tracer.height/2)).unit()*mag*6./TICRATE+vel).unit();
vel = mag*(level.Vec3Diff(pos,tracer.Vec3Offset(0,0,tracer.height/2)).unit()*mag*6./GameTicRate+vel).unit();
}
override void PostBeginPlay()
{

View file

@ -40,7 +40,7 @@ Class SWWMTitleStuff : EventHandler
double zoom = max(ceil(Screen.GetWidth()/tsize.x),ceil(Screen.GetHeight()/tsize.y));
vsize = (Screen.GetWidth(),Screen.GetHeight())/zoom;
Screen.DrawTexture(tex[2],false,(vsize.x-tsize.x)/2,(vsize.y-tsize.y)/2,DTA_VirtualWidthF,vsize.x,DTA_VirtualHeightF,vsize.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(192,0,0,0));
Screen.Dim("Black",clamp(1.-((level.maptime+e.FracTic)/Thinker.TICRATE)*.05,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight());
Screen.Dim("Black",clamp(1.-((level.maptime+e.FracTic)/GameTicRate)*.05,0.,1.),0,0,Screen.GetWidth(),Screen.GetHeight());
}
else Screen.Dim("Black",1.,0,0,Screen.GetWidth(),Screen.GetHeight());
double hs = max(min(floor(Screen.GetWidth()/320.),floor(Screen.GetHeight()/200.)),1.);
@ -51,43 +51,43 @@ Class SWWMTitleStuff : EventHandler
if ( sar > ar ) vsize = (tsize.x,tsize.x/ar);
else if ( sar < ar ) vsize = (tsize.y*ar,tsize.y);
else vsize = tsize;
double alf = clamp(((level.maptime+e.FracTic)/Thinker.TICRATE)-2,0.,1.);
alf *= 1.-clamp(((level.maptime+e.FracTic)/Thinker.TICRATE)-8,0.,1.);
double alf = clamp(((level.maptime+e.FracTic)/GameTicRate)-2,0.,1.);
alf *= 1.-clamp(((level.maptime+e.FracTic)/GameTicRate)-8,0.,1.);
Screen.DrawTexture(tex[0],false,(vsize.x-tsize.x)/2,(vsize.y-tsize.y)/2,DTA_VirtualWidthF,vsize.x,DTA_VirtualHeightF,vsize.y,DTA_KeepRatio,true,DTA_Alpha,alf);
String str = StringTable.Localize("$SWWM_TITLEPRESENTS");
alf = clamp(((level.maptime+e.FracTic)/Thinker.TICRATE)-10,0.,1.);
alf *= 1.-clamp(((level.maptime+e.FracTic)/Thinker.TICRATE)-16,0.,1.);
alf = clamp(((level.maptime+e.FracTic)/GameTicRate)-10,0.,1.);
alf *= 1.-clamp(((level.maptime+e.FracTic)/GameTicRate)-16,0.,1.);
Screen.DrawText(fnt,Font.CR_WHITE,(ss.x-fnt.StringWidth(str))/2,(ss.y-fnt.GetHeight())/2,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alf);
str = StringTable.Localize("$SWWM_TITLEMODBY");
alf = clamp(((level.maptime+e.FracTic)/Thinker.TICRATE)-18,0.,1.);
alf *= 1.-clamp(((level.maptime+e.FracTic)/Thinker.TICRATE)-24,0.,1.);
alf = clamp(((level.maptime+e.FracTic)/GameTicRate)-18,0.,1.);
alf *= 1.-clamp(((level.maptime+e.FracTic)/GameTicRate)-24,0.,1.);
Screen.DrawText(fnt,Font.CR_WHITE,(ss.x-fnt.StringWidth(str))/2,(ss.y-fnt.GetHeight())/2,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alf);
tsize = TexMan.GetScaledSize(tex[1]);
sar = tsize.x/tsize.y;
if ( sar > ar ) vsize = (tsize.x,tsize.x/ar);
else if ( sar < ar ) vsize = (tsize.y*ar,tsize.y);
else vsize = tsize;
alf = clamp(((level.maptime+e.FracTic)/Thinker.TICRATE)-26,0.,2.)*.5;
alf = clamp(((level.maptime+e.FracTic)/GameTicRate)-26,0.,2.)*.5;
Screen.DrawTexture(tex[1],false,(vsize.x-tsize.x)/2,(vsize.y-tsize.y)/2,DTA_VirtualWidthF,vsize.x,DTA_VirtualHeightF,vsize.y,DTA_KeepRatio,true,DTA_Alpha,alf);
if ( (level.maptime/Thinker.TICRATE) < 30 ) return;
if ( (level.maptime/GameTicRate) < 30 ) return;
// scrolls
if ( (scrolls.Size() <= 0 ) || (lastlang != lang.GetString()) )
{
scrolls.Clear();
String sstr = StringTable.Localize("$SWWM_TITLESCROLL");
sstr.Split(scrolls,"\n");
sbase = (level.maptime+e.FracTic)/Thinker.TICRATE;
sbase = (level.maptime+e.FracTic)/GameTicRate;
if ( sline >= scrolls.Size() ) sline = 0;
}
lastlang = lang.GetString();
// estimate scrool length
double llen = fnt.StringWidth(scrolls[sline]);
double soffset = 40*((level.maptime+e.FracTic)/Thinker.TICRATE-sbase);
double soffset = 40*((level.maptime+e.FracTic)/GameTicRate-sbase);
if ( soffset > llen+ss.x )
{
sline++;
if ( sline >= scrolls.Size() ) sline = 0;
sbase = (level.maptime+e.FracTic)/Thinker.TICRATE;
sbase = (level.maptime+e.FracTic)/GameTicRate;
soffset = 0;
}
double xx = ss.x-soffset;
@ -100,16 +100,16 @@ Class SWWMTitleStuff : EventHandler
{
for ( double trl = .1; trl < 1.; trl += .04 )
{
double yy = (ss.y-40)+10*sin(15*i+160*(level.maptime+e.FracTic)/Thinker.TICRATE-90.*(1.-trl));
double yy = (ss.y-40)+10*sin(15*i+160*(level.maptime+e.FracTic)/GameTicRate-90.*(1.-trl));
alf = max(0,1.-abs((ss.x/2)-xx)/(ss.x/2))**.5;
alf *= .2*trl;
double xxofs = 5*sin(15*i+120*(level.maptime+e.FracTic)/Thinker.TICRATE-90.*(1.-trl))-16*(1.-trl);
double xxofs = 5*sin(15*i+120*(level.maptime+e.FracTic)/GameTicRate-90.*(1.-trl))-16*(1.-trl);
Screen.DrawChar(fnt,Font.CR_BLUE,xx-xxofs,yy,ch,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alf,DTA_LegacyRenderStyle,STYLE_Add);
}
double yy = (ss.y-40)+10*sin(15*i+160*(level.maptime+e.FracTic)/Thinker.TICRATE);
double yy = (ss.y-40)+10*sin(15*i+160*(level.maptime+e.FracTic)/GameTicRate);
alf = max(0,1.-abs((ss.x/2)-xx)/(ss.x/2))**.5;
double xxofs = 5*sin(15*i+120*(level.maptime+e.FracTic)/Thinker.TICRATE);
Color c = Color(int(127.5+127.5*sin(10*i+80*(level.maptime+e.FracTic)/Thinker.TICRATE)),0,0);
double xxofs = 5*sin(15*i+120*(level.maptime+e.FracTic)/GameTicRate);
Color c = Color(int(127.5+127.5*sin(10*i+80*(level.maptime+e.FracTic)/GameTicRate)),0,0);
Screen.DrawChar(fnt,Font.CR_SAPPHIRE,xx-xxofs,yy,ch,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alf);
}
xx += fnt.GetCharWidth(ch)-1; // keming

View file

@ -764,7 +764,7 @@ Class SWWMUtility
Vector3 Momentum = HitDirection*MomentumTransfer;
if ( (Victim.pos.z <= Victim.floorz) || !Victim.TestMobjZ() )
Momentum.z = max(Momentum.z,.1*Momentum.length());
Momentum /= Thinker.TICRATE*max(50,Victim.Mass);
Momentum /= GameTicRate*max(50,Victim.Mass);
Victim.vel += Momentum;
}
@ -832,7 +832,7 @@ Class SWWMUtility
Vector3 Momentum = dir*mm;
if ( (a.pos.z <= a.floorz) || !a.TestMobjZ() )
Momentum.z = max(Momentum.z,(flags&DE_EXTRAZTHRUST?.4:.1)*Momentum.length());
Momentum /= Thinker.TICRATE*max(50,a.Mass); // prevent tiny things from getting yeeted at warp speed
Momentum /= GameTicRate*max(50,a.Mass); // prevent tiny things from getting yeeted at warp speed
a.vel += Momentum;
if ( (flags&DE_BLAST) && a.bCANBLAST && !a.bDONTBLAST ) a.bBLASTED = true;
}