-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Localisation, Monster Mess mutator, HUD fix, pickup messages (#25)
Co-authored-by: Kenneth Watson <--global>
- Loading branch information
Showing
10 changed files
with
235 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// ============================================================ | ||
// MonsterMess | ||
// ============================================================ | ||
// === Monster Hunt === | ||
// | ||
// Copyright 2000 - 2022 Kenneth "Shrimp" Watson | ||
// For more info, https://shrimpworks.za.net | ||
// ============================================================ | ||
|
||
class MonsterMess extends Mutator; | ||
|
||
function bool CheckReplacement(Actor Other, out byte bSuperRelevant) { | ||
local CreatureChunks chunk; | ||
local MonsterMessChunks hijacker; | ||
local MonsterMessBloodPool bloodpool; | ||
|
||
bSuperRelevant = 1; | ||
|
||
chunk = CreatureChunks(Other); | ||
if (chunk != None && !chunk.IsA('MonsterMessChunks')) { | ||
hijacker = Spawn(class'MonsterMessChunks',,, chunk.Location); | ||
if (hijacker != None) hijacker.orig = chunk; | ||
return true; | ||
} | ||
|
||
if (Other.IsA('CreatureCarcass')) { | ||
// the location is raised up a little - it seems sometimes the location of some creatures is in the ground? | ||
bloodpool = Spawn(class'MonsterMessBloodPool',,, Other.Location + vect(0, 20, 0), rot(16384, 0, 0)); | ||
if (bloodpool != None) bloodpool.rescale(Other); | ||
} | ||
|
||
bSuperRelevant = 0; | ||
return true; | ||
} | ||
|
||
defaultproperties { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// ============================================================ | ||
// MonsterMessBloodPool | ||
// ============================================================ | ||
// === Monster Hunt === | ||
// | ||
// Copyright 2000 - 2022 Kenneth "Shrimp" Watson | ||
// For more info, https://shrimpworks.za.net | ||
// ============================================================ | ||
|
||
class MonsterMessBloodPool extends UTBloodPool; | ||
|
||
/* | ||
Rescales the decal based on properties of the other actor. | ||
*/ | ||
function rescale(Actor other) { | ||
DetachDecal(); | ||
|
||
DrawScale = 0.04 * Other.CollisionRadius; | ||
|
||
AttachToSurface(); | ||
} | ||
|
||
defaultproperties { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
// ============================================================ | ||
// MonsterMessChunks | ||
// ============================================================ | ||
// === Monster Hunt === | ||
// | ||
// Copyright 2000 - 2022 Kenneth "Shrimp" Watson | ||
// For more info, https://shrimpworks.za.net | ||
// ============================================================ | ||
|
||
class MonsterMessChunks extends CreatureChunks; | ||
|
||
var CreatureChunks orig; // the original chunk we're going to duplicate | ||
var bool initialised; | ||
|
||
simulated function Landed(vector HitNormal) { | ||
local MonsterMessSplat splat; | ||
|
||
super.Landed(HitNormal); | ||
|
||
if ((Level.NetMode != NM_DedicatedServer) && !Level.bDropDetail) { | ||
if (!bGreenBlood) { | ||
splat = Spawn(class'MonsterMessSplat',,, Location, rotator(HitNormal)); | ||
if (splat != None) splat.rescale(Self); | ||
} | ||
} | ||
} | ||
|
||
simulated function HitWall(vector HitNormal, actor Wall) { | ||
local MonsterMessSplat splat; | ||
|
||
super.HitWall(HitNormal, Wall); | ||
|
||
if ((Level.NetMode != NM_DedicatedServer)) { | ||
if (!bGreenBlood && (!Level.bDropDetail || (FRand() < 0.75))) { | ||
splat = Spawn(class'MonsterMessSplat',,, Location, rotator(HitNormal)); | ||
if (splat != None) splat.rescale(Self); | ||
} | ||
} | ||
} | ||
|
||
function Tick(float delta) { | ||
// we're effectively polling here, until something sets the original chunk | ||
// once set, we'll replace the original chunk, and destroy it, then the | ||
// polling will stop | ||
if (orig == None || initialised) return; | ||
|
||
if (orig.velocity != vect(0, 0, 0) || orig.CarcassClass != None) { | ||
HijackChunk(); | ||
initialised = true; | ||
} | ||
} | ||
|
||
/* | ||
Copies the properties of an existing chunk and simulates the calls made to | ||
CreatureChunks by CreatureCarcass when chunked. | ||
*/ | ||
function HijackChunk() { | ||
// things the carcass sets | ||
TrailSize = orig.TrailSize; | ||
Mesh = orig.Mesh; | ||
bMasterChunk = orig.bMasterChunk; | ||
|
||
// things InitFor sets | ||
PlayerOwner = orig.PlayerOwner; | ||
bDecorative = false; | ||
DrawScale = orig.DrawScale; | ||
SetCollisionSize(orig.CollisionRadius, orig.CollisionHeight); | ||
RotationRate = orig.RotationRate; | ||
Velocity = orig.Velocity; | ||
|
||
if (bMasterChunk) { | ||
// stuff from SetAsMaster | ||
CarcassClass = orig.CarcassClass; | ||
CarcassAnim = orig.CarcassAnim; | ||
CarcLocation = orig.CarcLocation; | ||
CarcHeight = orig.CarcHeight; | ||
} | ||
|
||
bGreenBlood = orig.bGreenBlood; | ||
Buoyancy = orig.Buoyancy; | ||
|
||
Bugs = orig.Bugs; | ||
if (Bugs != None) Bugs.SetBase(self); | ||
|
||
orig.Destroy(); | ||
} | ||
|
||
defaultproperties { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// ============================================================ | ||
// MonsterMessSplat | ||
// ============================================================ | ||
// === Monster Hunt === | ||
// | ||
// Copyright 2000 - 2022 Kenneth "Shrimp" Watson | ||
// For more info, https://shrimpworks.za.net | ||
// ============================================================ | ||
|
||
class MonsterMessSplat extends BloodSplat; | ||
|
||
/* | ||
Rescales the decal based on properties of the other actor. | ||
*/ | ||
function rescale(Actor other) { | ||
DetachDecal(); | ||
|
||
DrawScale = 0.025 * Other.CollisionRadius; | ||
|
||
AttachToSurface(); | ||
} | ||
|
||
defaultproperties { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters