Doom Vacation support.

This commit is contained in:
Mari the Deer 2021-02-12 20:57:26 +01:00
commit 642ba9018d
12 changed files with 216 additions and 3 deletions

Binary file not shown.

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r265 \cu(Fri 12 Feb 16:48:39 CET 2021)\c-";
SWWM_SHORTVER="\cw0.9.11b-pre r265 \cu(2021-02-12 16:48:39)\c-";
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r266 \cu(Fri 12 Feb 20:57:26 CET 2021)\c-";
SWWM_SHORTVER="\cw0.9.11b-pre r266 \cu(2021-02-12 20:57:26)\c-";

View file

@ -1074,3 +1074,15 @@ menu/buyinv sounds/menu/buysnd.ogg
$alias misc/invchange menu/demosel
UseArtifact DSEMPTY
StartupTick DSEMPTY
// doom vacation stuff
DSSING sounds/BRUH.ogg
DSMOAN DSEMPTY
DSVXsex1 DSEMPTY
DSVXsex2 DSEMPTY
DSVXsex3 DSEMPTY
DSVXsex4 DSEMPTY
misc/boinkend sounds/BOINK1.ogg
misc/boink1 sounds/BOINK2.ogg
misc/boink2 sounds/BOINK3.ogg
$random misc/boink { misc/boink1 misc/boink2 }

BIN
sounds/BOINK1.ogg Executable file

Binary file not shown.

BIN
sounds/BOINK2.ogg Executable file

Binary file not shown.

BIN
sounds/BOINK3.ogg Executable file

Binary file not shown.

View file

@ -46,6 +46,61 @@ SCRIPT "EQUINOX_BRAINCRUSH" ( int tag )
Ceiling_CrushAndRaiseDist(tag,8,8,10);
}
SCRIPT "DVACATION_UNFUCK" ( void )
{
Delay(1);
SetLineSpecial(2,226,StrArg("DVACATION_EXIT"));
SetLineSpecial(3,226,StrArg("DVACATION_BED"));
}
bool gotexit = false;
SCRIPT "DVACATION_EXIT" ( void )
{
if ( gotexit ) terminate;
gotexit = true;
SetPlayerProperty(0,1,PROP_FROZEN);
for ( int i=0; i<5; i++ )
{
QuakeEx(666,1,1,1,3,0,120,"",QF_RELATIVE|QF_SCALEDOWN);
PlaySound(666,"misc/boink",CHAN_AUTO);
Delay(Random(2,4)*3);
}
Delay(5);
QuakeEx(666,3,3,3,15,0,120,"",QF_RELATIVE|QF_SCALEDOWN);
PlaySound(666,"misc/boinkend",CHAN_AUTO);
Delay(30);
SetPlayerProperty(0,0,PROP_FROZEN);
Exit_Normal(0);
}
bool inbed = false;
int boinks = 0;
SCRIPT "DVACATION_BED" ( void )
{
if ( inbed || (boinks >= 5) ) terminate;
inbed = true;
SetPlayerProperty(0,1,PROP_FROZEN);
for ( int i=0; i<5; i++ )
{
QuakeEx(667,1,1,1,3,0,120,"",QF_RELATIVE|QF_SCALEDOWN);
PlaySound(667,"misc/boink",CHAN_AUTO);
Delay(Random(2,4)*3);
}
Delay(5);
QuakeEx(667,3,3,3,15,0,120,"",QF_RELATIVE|QF_SCALEDOWN);
PlaySound(667,"misc/boinkend",CHAN_AUTO);
SpawnSpot("SWWMItemFog",27);
PlaySound(27,"misc/spawn",CHAN_AUTO);
Thing_SpawnNoFog(27,Random(23,25),0,0);
SetPlayerProperty(0,0,PROP_FROZEN);
Delay(15);
boinks++;
inbed = false;
if ( boinks >= 5 ) SetThingSpecial(667,0,0); // can headpat now
}
// this one is for forcing episodes to continue seamlessly
// will be used eventually
SCRIPT "EPISODIC_CONTD" ( void )

View file

@ -168,7 +168,6 @@ DoomEdNums
4206908 = MilkBreads
4206909 = KirinManga
4206910 = KirinPlush
}
// edited Doom 2 cast to show the Demolitionist at the end

View file

@ -101,6 +101,18 @@ Class SWWMLevelCompatibility : LevelPostProcessor
case '3805A661D5C4523AFF7BF86991071043':
EquinoxBossBrainHandle(4106,60);
break;
// Doom Vacation MAP01 (1.4)
case 'F286BABF0D152259CD6B996E8920CA70':
// Doom Vacation MAP01 (1.5)
case 'A52BD2038CF814101AAB7D9C78F9ACE2':
// two girls shouldn't be headpattable, as they have use lines around them
SetThingArgument(314,0,1);
SetThingArgument(315,0,1);
SetThingID(314,666);
SetThingID(315,667);
// unfortunately the line special wrangling has to be done one tic after map load
// because fuck absolutely everything about how ACS works
break;
// Kinsie's Test Map (HERETIC)
case '0EADB2F82732A968B8513E4DC6138439':
numcol = 7;
@ -147,6 +159,39 @@ Class SWWMLevelCompatibility : LevelPostProcessor
level.ReplaceTextures("RROCK07","EQNXRR07",0);
level.ReplaceTextures("RROCK08","EQNXRR08",0);
break;
// ALL of Doom Vacation
case 'D07842872226058F93D0957EA46ED782':
case 'F286BABF0D152259CD6B996E8920CA70':
case '7E2707328B6BCF0ACDC2E80049E21167':
case '8AA3E9B8E816E72A04368404402DD8E3':
case '8B28736D01492F3701CCD736C97EF125':
case '10D3C12050518E806801B12057437403':
case '48A7FC1AF2D1CCBFE7C6EFB4EEE97A50':
case '73B317A0DA2C75BD903E895A27EEEDB9':
case '62158F76FC56B62007C1F167A7921304':
case '0D33878E4C8164A792AECCDA56F08D60':
case 'A52BD2038CF814101AAB7D9C78F9ACE2':
case 'F6413AFAEB73B3848A82F70C2A01E47D':
case 'F8CBDC96A7E08CAFC5D7C0E711551E40':
case '3E821CC90C38B7D71DDEB0324D3900CC':
case '05D0AA06742B3C7DCD79E5F659267656':
case '8F6710E3570C2056FDCA591EF89B31A9':
case '382E99BBFA9301110630CD5F8F8056DA':
case '480F6AD2D2E266DA745FD8FA75EC327D':
case '968D97F5952E55DB2464274A8EE5F529':
case '5669E396BEDDEA6D90EF5AF5EC892811':
// get rid of these dumb skulltag ctf actors
for ( int i=0; i<GetThingCount(); i++ )
{
int ednum = GetThingEdNum(i);
if ( (ednum == 5130) || (ednum == 5131)
|| (ednum == 5080) || (ednum == 5081) )
SetThingEdNum(i,0);
}
// get rid of moan switches
level.ReplaceTextures("SW1ZIM","-noflat-",0);
level.ReplaceTextures("SW1TEK","-noflat-",0);
break;
}
// [Hexen] force Mystic Ambit Incants to spawn outside coop
if ( gameinfo.gametype&GAME_Hexen )

View file

@ -818,6 +818,12 @@ Class SWWMHandler : EventHandler
AddOneliner("mapstart",3);
if ( !e.IsSaveGame && !e.IsReopen )
{
// doom vacation map01 hackaround for OPEN script not letting us
// change certain line specials in levelpostprocessor because
// HOLY FUCK IS EVERYTHING SHIT SOMETIMES
if ( (level.GetChecksum() ~== "F286BABF0D152259CD6B996E8920CA70")
|| (level.GetChecksum() ~== "A52BD2038CF814101AAB7D9C78F9ACE2") )
level.ExecuteSpecial(ACS_Execute,null,null,false,-Int('DVACATION_UNFUCK'));
// for skipping over merged exit lines (sharing vertices)
Array<Line> skipme;
skipme.Clear();
@ -1853,6 +1859,83 @@ Class SWWMHandler : EventHandler
e.Thing.SetTag("$FN_NDEMON");
//e.Thing.Obituary = "$OB_NDEMON";
}
// doom vacation stuff
else if ( SWWMUtility.InDoomVacation() )
{
if ( e.Thing.GetClassName() == "Babe" )
{
e.Thing.bSHOOTABLE = false; // no hurt
let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos);
hp.target = e.Thing;
HeadpatTracker(hp).hdoomheightfix = .2;
}
else if ( e.Thing.GetClassName() == "CommanderKeen" )
{
let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos);
hp.target = e.Thing;
HeadpatTracker(hp).hdoomheightfix = .4;
HeadpatTracker(hp).hdoomangfix = 5;
}
else if ( e.Thing.GetClassName() == "BBChair" )
{
e.Thing.bUSESPECIAL = false;
let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos);
hp.target = e.Thing;
HeadpatTracker(hp).hdoomheightfix = .2;
HeadpatTracker(hp).hdoomangfix = 15;
HeadpatTracker(hp).patstate = e.Thing.MeleeState;
}
else if ( e.Thing.GetClassName() == "EvilEye" )
{
let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos);
hp.target = e.Thing;
HeadpatTracker(hp).hdoomheightfix = .1;
}
else if ( e.Thing.GetClassName() == "HeadCandles" )
{
let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos);
hp.target = e.Thing;
HeadpatTracker(hp).hdoomangfix = 20;
}
else if ( e.Thing.GetClassName() == "HeartColumn" )
{
let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos);
hp.target = e.Thing;
HeadpatTracker(hp).hdoomheightfix = -.3;
}
else if ( e.Thing.GetClassName() == "Meat2" )
{
let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos);
hp.target = e.Thing;
HeadpatTracker(hp).hdoomheightfix = .6;
HeadpatTracker(hp).hdoomangfix = -15;
HeadpatTracker(hp).dvacationarghack = true;
}
else if ( e.Thing.GetClassName() == "Meat3" )
{
let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos);
hp.target = e.Thing;
HeadpatTracker(hp).hdoomheightfix = .6;
HeadpatTracker(hp).hdoomangfix = 20;
HeadpatTracker(hp).dvacationarghack = true;
}
else if ( e.Thing.GetClassName() == "LegsBabe" )
{
let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos);
hp.target = e.Thing;
HeadpatTracker(hp).hdoomheightfix = -1.5;
HeadpatTracker(hp).hdoomangfix = 20;
HeadpatTracker(hp).dvacationarghack = true;
}
else if ( e.Thing.GetClassName() == "Meat4" )
{
let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos);
hp.target = e.Thing;
HeadpatTracker(hp).hdoomheightfix = .6;
HeadpatTracker(hp).hdoomangfix = 15;
HeadpatTracker(hp).dvacationarghack = true;
}
}
if ( SWWMUtility.IdentifyingDog(e.Thing) || SWWMUtility.IdentifyingCaco(e.Thing)
|| SWWMUtility.IdentifyingDrug(e.Thing) || SWWMUtility.IdentifyingDoubleBoi(e.Thing) )
{

View file

@ -3453,6 +3453,7 @@ Class HeadpatTracker : Actor
double hdoomheightfix; // certain hdoom monsters kneel down, so their heads are lower than expected
double hdoomangfix; // fix for imp in a chair
bool lethalpat; // ending headpat immediately drops enemy health to 0
bool dvacationarghack; // hackfix for some girls in doom vacation, disallows headpats if args[0] is 1
default
{
@ -3497,6 +3498,7 @@ Class HeadpatTracker : Actor
if ( patting ) return false; // already on it
if ( user.player.crouchdir == -1 ) return false; // need to be standing up
if ( !user.player.onground ) return false; // need to be on solid ground
if ( dvacationarghack && (target.args[0] == 1) ) return false; // can't pat at the moment
// check use range
Vector3 diff = level.Vec3Diff(user.Vec2OffsetZ(0,0,user.player.viewz),Vec3Offset(0,0,target.Height));
if ( abs(diff.z) > PlayerPawn(user.player.mo).UseRange ) return false;

View file

@ -968,6 +968,23 @@ Class SWWMUtility
return false;
}
// detect doom vacation
static bool InDoomVacation()
{
// cheap, but hey, it should work
if ( Wads.FindLump("VACABEX") != -1 )
{
// just to make sure
for ( int i=0; i<AllActorClasses.Size(); i++ )
{
if ( AllActorClasses[i].GetClassName() != "Babe" )
continue;
return true;
}
}
return false;
}
// detect vanilla maps (across all IWAD versions)
static bool IsVanillaDoomMap()
{