|
|
|
@ -21,7 +21,7 @@ enum KiriSprayerStatus
|
|
|
|
|
KIRI_SPRAY_WS_PRESSURE = 2
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class SnekTechSprayer : HDWeapon
|
|
|
|
|
class Sprayer : HDWeapon
|
|
|
|
|
{
|
|
|
|
|
default
|
|
|
|
|
{
|
|
|
|
@ -109,7 +109,7 @@ class SnekTechSprayer : HDWeapon
|
|
|
|
|
|
|
|
|
|
if(invoker.GetPressure() < KIRI_SPRAY_PRESSURE_PER_USE) {
|
|
|
|
|
|
|
|
|
|
invoker.owner.A_Log("Not enough pressure to spray.", true);
|
|
|
|
|
invoker.owner.A_Log("Not enough pressure to spray.");
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
@ -118,7 +118,7 @@ class SnekTechSprayer : HDWeapon
|
|
|
|
|
float zOffset = GunHeight() * 0.8;
|
|
|
|
|
FLineTraceData lineTraceData;
|
|
|
|
|
|
|
|
|
|
class<SnekTechSprayerPattern> sprayerPatternClass = "SnekTechSprayerPattern";
|
|
|
|
|
class<SprayerPattern> sprayerPatternClass = "SprayerPattern";
|
|
|
|
|
|
|
|
|
|
// Find the spray pattern class that matches the
|
|
|
|
|
// player's CVar for selected pattern.
|
|
|
|
@ -126,10 +126,10 @@ class SnekTechSprayer : HDWeapon
|
|
|
|
|
"snektech_spraypattern",
|
|
|
|
|
invoker.owner.player).GetString();
|
|
|
|
|
for(int i = 0; i < AllActorClasses.size(); i++) {
|
|
|
|
|
class<SnekTechSprayerPattern> thisPatternClass = (class<SnekTechSprayerPattern>)(AllActorClasses[i]);
|
|
|
|
|
class<SprayerPattern> thisPatternClass = (class<SprayerPattern>)(AllActorClasses[i]);
|
|
|
|
|
if(thisPatternClass) {
|
|
|
|
|
if(thisPatternClass.GetClassName() == currentSprayCVar) {
|
|
|
|
|
sprayerPatternClass = (class<SnekTechSprayerPattern>)(AllActorClasses[i]);
|
|
|
|
|
sprayerPatternClass = (class<SprayerPattern>)(AllActorClasses[i]);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -155,10 +155,10 @@ class SnekTechSprayer : HDWeapon
|
|
|
|
|
CHAN_WEAPON);
|
|
|
|
|
|
|
|
|
|
[success, spawnedThing] = A_SpawnItemEx(
|
|
|
|
|
"SnekTechSprayerDecalSpawner",
|
|
|
|
|
"SprayerDecalSpawner",
|
|
|
|
|
xofs : 0, yofs : 0, zofs : zOffset);
|
|
|
|
|
|
|
|
|
|
SnekTechSprayerDecalSpawner spawner = SnekTechSprayerDecalSpawner(spawnedThing);
|
|
|
|
|
SprayerDecalSpawner spawner = SprayerDecalSpawner(spawnedThing);
|
|
|
|
|
|
|
|
|
|
if(success && spawner) {
|
|
|
|
|
spawner.A_SetPitch(pitch);
|
|
|
|
@ -172,7 +172,7 @@ class SnekTechSprayer : HDWeapon
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
invoker.owner.A_Log("Not close enough to a wall to spray.", true);
|
|
|
|
|
invoker.owner.A_Log("Not close enough to a wall to spray.");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -298,7 +298,7 @@ class SnekTechSprayer : HDWeapon
|
|
|
|
|
ret.clear();
|
|
|
|
|
for(int i = 0; i < AllActorClasses.Size(); i++) {
|
|
|
|
|
class<Actor> c = AllActorClasses[i];
|
|
|
|
|
if(c is "SnekTechSprayerPattern" && c != "SnekTechSprayerPattern") {
|
|
|
|
|
if(c is "SprayerPattern" && c != "SprayerPattern") {
|
|
|
|
|
ret.push(c.GetClassName());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -324,7 +324,7 @@ class SnekTechSprayer : HDWeapon
|
|
|
|
|
// Set the new CVar.
|
|
|
|
|
CVar.GetCVar("snektech_spraypattern", owner.player).SetString(patternList[newIndex]);
|
|
|
|
|
currentPattern = CVar.GetCVar("snektech_spraypattern", owner.player).GetString();
|
|
|
|
|
owner.A_Log("Selected spray pattern: "..currentPattern, true);
|
|
|
|
|
owner.A_Log("Selected spray pattern: "..currentPattern);
|
|
|
|
|
|
|
|
|
|
// Current pattern is referenced in the help text, so reset
|
|
|
|
|
// it.
|
|
|
|
@ -358,7 +358,7 @@ class SnekTechSprayer : HDWeapon
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class SnekTechSprayerDecalSpawner : Actor
|
|
|
|
|
class SprayerDecalSpawner : Actor
|
|
|
|
|
{
|
|
|
|
|
default
|
|
|
|
|
{
|
|
|
|
@ -382,10 +382,10 @@ class SnekTechSprayerDecalSpawner : Actor
|
|
|
|
|
A_SprayDecal(actualDecalName, KIRI_SPRAY_DISTANCE);
|
|
|
|
|
|
|
|
|
|
// Figure out a new ID number.
|
|
|
|
|
ThinkerIterator iter = ThinkerIterator.Create("SnekTechSprayerDecalSpawner");
|
|
|
|
|
SnekTechSprayerDecalSpawner otherSpawner;
|
|
|
|
|
ThinkerIterator iter = ThinkerIterator.Create("SprayerDecalSpawner");
|
|
|
|
|
SprayerDecalSpawner otherSpawner;
|
|
|
|
|
int maxId = 0;
|
|
|
|
|
while(otherSpawner = SnekTechSprayerDecalSpawner(iter.Next())) {
|
|
|
|
|
while(otherSpawner = SprayerDecalSpawner(iter.Next())) {
|
|
|
|
|
|
|
|
|
|
if(otherSpawner == self) {
|
|
|
|
|
continue;
|
|
|
|
@ -401,14 +401,14 @@ class SnekTechSprayerDecalSpawner : Actor
|
|
|
|
|
thisSprayerId = maxId + 1;
|
|
|
|
|
|
|
|
|
|
// Clear old sprayers.
|
|
|
|
|
iter = ThinkerIterator.Create("SnekTechSprayerDecalSpawner");
|
|
|
|
|
while(otherSpawner = SnekTechSprayerDecalSpawner(iter.Next())) {
|
|
|
|
|
iter = ThinkerIterator.Create("SprayerDecalSpawner");
|
|
|
|
|
while(otherSpawner = SprayerDecalSpawner(iter.Next())) {
|
|
|
|
|
|
|
|
|
|
if(otherSpawner == self) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(otherSpawner.thisSprayerId < (thisSprayerId - 10)) {
|
|
|
|
|
if(otherSpawner.thisSprayerId < (thisSprayerId - 5)) {
|
|
|
|
|
if(otherSpawner.master == master) {
|
|
|
|
|
otherSpawner.Destroy();
|
|
|
|
|
}
|
|
|
|
@ -429,93 +429,93 @@ class SnekTechSprayerDecalSpawner : Actor
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class SnekTechSprayerPattern : Actor
|
|
|
|
|
class SprayerPattern : Actor
|
|
|
|
|
{
|
|
|
|
|
string decalName;
|
|
|
|
|
property decalName:decalName;
|
|
|
|
|
|
|
|
|
|
default {
|
|
|
|
|
SnekTechSprayerPattern.decalName "KiriTestDecal";
|
|
|
|
|
SprayerPattern.decalName "KiriTestDecal";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class SnekSpray_TransPride : SnekTechSprayerPattern
|
|
|
|
|
class SnekSpray_TransPride : SprayerPattern
|
|
|
|
|
{
|
|
|
|
|
default
|
|
|
|
|
{
|
|
|
|
|
SnekTechSprayerPattern.decalName "SnekSpray_TransPride";
|
|
|
|
|
SprayerPattern.decalName "SnekSpray_TransPride";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class SnekSpray_LesbianPride : SnekTechSprayerPattern
|
|
|
|
|
class SnekSpray_LesbianPride : SprayerPattern
|
|
|
|
|
{
|
|
|
|
|
default
|
|
|
|
|
{
|
|
|
|
|
SnekTechSprayerPattern.decalName "SnekSpray_LesbianPride";
|
|
|
|
|
SprayerPattern.decalName "SnekSpray_LesbianPride";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class SnekSpray_NBPride : SnekTechSprayerPattern
|
|
|
|
|
class SnekSpray_NBPride : SprayerPattern
|
|
|
|
|
{
|
|
|
|
|
default
|
|
|
|
|
{
|
|
|
|
|
SnekTechSprayerPattern.decalName "SnekSpray_NBPride";
|
|
|
|
|
SprayerPattern.decalName "SnekSpray_NBPride";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class SnekSpray_AcePride : SnekTechSprayerPattern
|
|
|
|
|
class SnekSpray_AcePride : SprayerPattern
|
|
|
|
|
{
|
|
|
|
|
default
|
|
|
|
|
{
|
|
|
|
|
SnekTechSprayerPattern.decalName "SnekSpray_AcePride";
|
|
|
|
|
SprayerPattern.decalName "SnekSpray_AcePride";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class SnekSpray_ProgressPride : SnekTechSprayerPattern
|
|
|
|
|
class SnekSpray_ProgressPride : SprayerPattern
|
|
|
|
|
{
|
|
|
|
|
default
|
|
|
|
|
{
|
|
|
|
|
SnekTechSprayerPattern.decalName "SnekSpray_ProgressPride";
|
|
|
|
|
SprayerPattern.decalName "SnekSpray_ProgressPride";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class SnekSpray_DemiPride : SnekTechSprayerPattern
|
|
|
|
|
class SnekSpray_DemiPride : SprayerPattern
|
|
|
|
|
{
|
|
|
|
|
default
|
|
|
|
|
{
|
|
|
|
|
SnekTechSprayerPattern.decalName "SnekSpray_DemiPride";
|
|
|
|
|
SprayerPattern.decalName "SnekSpray_DemiPride";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class SnekSpray_PanPride : SnekTechSprayerPattern
|
|
|
|
|
class SnekSpray_PanPride : SprayerPattern
|
|
|
|
|
{
|
|
|
|
|
default
|
|
|
|
|
{
|
|
|
|
|
SnekTechSprayerPattern.decalName "SnekSpray_PanPride";
|
|
|
|
|
SprayerPattern.decalName "SnekSpray_PanPride";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class SnekSpray_SwitchPride : SnekTechSprayerPattern
|
|
|
|
|
class SnekSpray_SwitchPride : SprayerPattern
|
|
|
|
|
{
|
|
|
|
|
default
|
|
|
|
|
{
|
|
|
|
|
SnekTechSprayerPattern.decalName "SnekSpray_SwitchPride";
|
|
|
|
|
SprayerPattern.decalName "SnekSpray_SwitchPride";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class SnekSpray_BiPride : SnekTechSprayerPattern
|
|
|
|
|
class SnekSpray_BiPride : SprayerPattern
|
|
|
|
|
{
|
|
|
|
|
default
|
|
|
|
|
{
|
|
|
|
|
SnekTechSprayerPattern.decalName "SnekSpray_BiPride";
|
|
|
|
|
SprayerPattern.decalName "SnekSpray_BiPride";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class SnekSpray_GayPride : SnekTechSprayerPattern
|
|
|
|
|
class SnekSpray_GayPride : SprayerPattern
|
|
|
|
|
{
|
|
|
|
|
default
|
|
|
|
|
{
|
|
|
|
|
SnekTechSprayerPattern.decalName "SnekSpray_GayPride";
|
|
|
|
|
SprayerPattern.decalName "SnekSpray_GayPride";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|