diff --git a/luaui/configs/DeferredLightsGL4config.lua b/luaui/configs/DeferredLightsGL4config.lua index 9cb1c372880..6d31ed5c56e 100644 --- a/luaui/configs/DeferredLightsGL4config.lua +++ b/luaui/configs/DeferredLightsGL4config.lua @@ -19163,6 +19163,26 @@ local unitLights = { lifetime = 0, sustain = 0, animtype = 0}, } }, + ['legch'] = { + buildlight = { -- this is the lightname + lightType = 'cone', + pieceName = 'cagelight_emit', + lightConfig = { posx = 0, posy = 0, posz = 0, radius = 18, + dirx = 1, diry = 0, dirz = 0, theta = 0.99000001, + r = 1.29999995, g = 0.89999998, b = 0.1, a = 2, + modelfactor = 0.1, specular = 0.2, scattering = 1.5, lensflare = 8, + lifetime = 0, sustain = 0, animtype = 0}, + }, + nanolight = { + lightType = 'point', + pieceName = 'nano', + lightConfig = { posx = 0, posy = 0, posz = 1, radius = 17, + color2r = 0, color2g = 0, color2b = 0, colortime = 0, + r = -1, g = 1, b = 1, a = 0.3, + modelfactor = 0.5, specular = 0.5, scattering = 1, lensflare = 10, + lifetime = 0, sustain = 0, animtype = 0}, + } + }, ['armraz'] = { eyes1 = { lightType = 'point', diff --git a/objects3d/Units/legch.s3o b/objects3d/Units/legch.s3o new file mode 100644 index 00000000000..f333352625b Binary files /dev/null and b/objects3d/Units/legch.s3o differ diff --git a/objects3d/Units/legch_dead.s3o b/objects3d/Units/legch_dead.s3o new file mode 100644 index 00000000000..0573ebc950d Binary files /dev/null and b/objects3d/Units/legch_dead.s3o differ diff --git a/scripts/Units/legch_clean.bos b/scripts/Units/legch_clean.bos new file mode 100644 index 00000000000..bd4181574f9 --- /dev/null +++ b/scripts/Units/legch_clean.bos @@ -0,0 +1,151 @@ + +#include "../recoil_common_includes.h" + +piece base, ground, cylinder, cagelight, cagelight_emit, fan, lfan, rfan, lhinge1, lhinge2, ldoor, rhinge1, rhinge2, rdoor, turret, box, gun, nano, wake; + +static-var terrain, readyToBuild; + +// Signal definitions +#define SIGNAL_MOVE 1 +#define SIGNAL_BUILD 2 +#define SIGNAL_IDLE 8 + + +#define HOVER_BASE base +#define HOVER_BANKSPEED <12> +#define HOVER_ROCKBASE ground +#define HOVER_WOBBLE_PERIOD 38 +#define HOVER_WOBBLE_AMPLITUDE [0.1] +#define HOVER_WAKEPIECE wake +#define HOVER_IDLE_SFX 1024 + 2 +#define HOVER_WAKE_SFX_1 1024 + 0 +#define HOVER_WAKE_SFX_2 1024 + 1 +#include "../bar_hovercraft_common.h" + +#define BASEPIECE base +#define HITSPEED <30.0> +//how 'heavy' the unit is, on a scale of 1-10 +#define UNITSIZE 2 +#define MAXTILT 100 + +#include "../unit_hitbyweaponid_and_smoke.h" + + +Create() +{ + hide nano; + hide wake; + hide cagelight_emit; + spin cylinder around x-axis speed <30> accelerate <10>; + turn fan to x-axis <-45> now; + spin lfan around y-axis speed <-300> accelerate <30>; + spin rfan around y-axis speed <300> accelerate <30>; + readyToBuild = 0; + SLEEP_UNTIL_UNITFINISHED; + start-script HoverCraftMotion(); +} + +StartBuilding(heading, pitch) +{ + signal SIGNAL_BUILD; + set-signal-mask SIGNAL_BUILD; + + if (!readyToBuild){ + turn ldoor to z-axis <180> speed <50.0>; + turn lhinge2 to z-axis <100> speed <50.0>; + turn lhinge1 to z-axis <30> speed <50.0>; + turn rdoor to z-axis <-180> speed <50.0>; + turn rhinge2 to z-axis <-100> speed <50.0>; + turn rhinge1 to z-axis <-30> speed <50.0>; + wait-for-turn rhinge1 around z-axis; + move box to y-axis [9] speed [10]; + wait-for-move box along y-axis; + move cagelight to y-axis [2.2] speed [5]; + readyToBuild = 1; + } + + show nano; + + turn turret to y-axis heading speed <160.0>; + turn gun to x-axis <0.000000> - pitch speed <40.0>; + wait-for-turn turret around y-axis; + set INBUILDSTANCE to 1; + + show cagelight_emit; + spin cagelight_emit around y-axis speed <225>; + spin cylinder around x-axis speed <240> accelerate <10>; + + readyToBuild = 1; +} + +StopBuilding() +{ + signal SIGNAL_BUILD; + set-signal-mask SIGNAL_BUILD; + + hide nano; + hide cagelight_emit; + turn cagelight_emit to y-axis <0> now; + + sleep 6000; + + set INBUILDSTANCE to 0; + + readyToBuild = 0; + + turn turret to y-axis <0> speed <160.0>; + turn gun to x-axis <0> speed <40.0>; + wait-for-turn turret around y-axis; + turn ldoor to z-axis <0> speed <50.0>; + turn lhinge1 to z-axis <0> speed <50.0>; + turn lhinge2 to z-axis <0> speed <50.0>; + turn rdoor to z-axis <0> speed <50.0>; + turn rhinge1 to z-axis <0> speed <50.0>; + turn rhinge2 to z-axis <0> speed <50.0>; + move box to y-axis [0] speed [10]; + move cagelight to y-axis [0] speed [5]; + spin cylinder around x-axis speed <30> accelerate <5>; +} + +QueryNanoPiece(pieceIndex) +{ + pieceIndex = nano; +} + + +Killed(severity, corpsetype) +{ + if( severity <= 25 ) + { + corpsetype = 1 ; + explode base type BITMAPONLY | NOHEATCLOUD; + + explode turret type FIRE | SMOKE | FALL | NOHEATCLOUD; + explode nano type BITMAPONLY | NOHEATCLOUD; + return(corpsetype); + } + if( severity <= 50 ) + { + corpsetype = 2 ; + explode base type BITMAPONLY | NOHEATCLOUD; + + explode turret type FALL | NOHEATCLOUD; + explode nano type FALL | NOHEATCLOUD; + return(corpsetype); + } + if( severity <= 99 ) + { + corpsetype = 3 ; + explode base type FIRE | SMOKE | FALL | NOHEATCLOUD; + + explode turret type FIRE | SMOKE | FALL | NOHEATCLOUD; + explode nano type FIRE | SMOKE | FALL | NOHEATCLOUD; + return(corpsetype); + } + corpsetype = 3 ; + explode base type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD; + + explode turret type EXPLODE_ON_HIT | FIRE | FALL | NOHEATCLOUD; + explode nano type EXPLODE_ON_HIT | FIRE | SMOKE | FALL | NOHEATCLOUD; + return corpsetype; +} diff --git a/scripts/Units/legch_clean.cob b/scripts/Units/legch_clean.cob new file mode 100644 index 00000000000..a237444791a Binary files /dev/null and b/scripts/Units/legch_clean.cob differ diff --git a/unitpics/legch.dds b/unitpics/legch.dds index 5a88c38837f..c6f59ca2304 100644 Binary files a/unitpics/legch.dds and b/unitpics/legch.dds differ diff --git a/units/Legion/Constructors/legch.lua b/units/Legion/Constructors/legch.lua index bf2d14ef5a9..f12113a2393 100644 --- a/units/Legion/Constructors/legch.lua +++ b/units/Legion/Constructors/legch.lua @@ -25,9 +25,9 @@ return { speed = 60.899, maxwaterdepth = 0, movementclass = "HOVER3", - objectname = "Units/CORCH.s3o", + objectname = "Units/LEGCH.s3o", radardistance = 50, - script = "Units/CORCH.cob", + script = "Units/LEGCH_CLEAN.cob", seismicsignature = 0, selfdestructas = "smallExplosionGenericSelfd-builder", sightdistance = 338, @@ -87,8 +87,8 @@ return { }, customparams = { unitgroup = 'builder', - model_author = "Beherith", - normaltex = "unittextures/cor_normal.dds", + model_author = "EnderRobo", + normaltex = "unittextures/leg_normal.dds", subfolder = "CorHovercraft", }, featuredefs = { @@ -104,7 +104,7 @@ return { footprintz = 3, height = 20, metal = 100, - object = "Units/corch_dead.s3o", + object = "Units/legch_dead.s3o", reclaimable = true, }, heap = {