Work on chase crit shape

This commit is contained in:
2026-04-01 16:21:19 +01:00
parent 6d1cdcc9f3
commit c1bddbae20
4 changed files with 35 additions and 25 deletions
+9 -2
View File
@@ -57,7 +57,6 @@ drawChaseCrit cr = mconcat
]
where
cskin = crShape $ _crType cr
crsize = 0.1 * crRad (cr ^. crType)
rotmdir = rotateSH (_crMvDir cr - _crDir cr)
chaseUpperBody :: Creature -> Shape
@@ -72,10 +71,18 @@ chaseUpperBody cr = colorSH (_skinUpper cskin)
where
tz = 4
cskin = crShape $ _crType cr
torsoq = (V3 0 0 (10 + tz),Q.qid)
torsoq = (V3 0 0 (10 + tz + tbob),Q.qid)
mcool = 1 - min 10 (fromIntegral . _meleeCooldown $ _crType cr) / 10
neckq = torsoq `Q.comp` (V3 6 0 0,Q.axisAngle (V3 0 1 0) (-1.8*mcool))
headq = neckq `Q.comp` (V3 16 0 0, Q.axisAngle (V3 0 1 0) (2*mcool))
sLen = _strideLength $ _crStance cr
tbob = 5 * (1 - oneSmooth (abs llegpos))
llegpos = case cr ^? crStance . carriage of
Just (Walking sa LeftForward) -> f sa
Just (Walking sa RightForward) -> -f sa
_ -> 0
--tbob = 2 * oneSmooth ((sLen - 2*i) / sLen)
f i = ((sLen - 2*i) / sLen)
oneSmooth :: Float -> Float
+1 -1
View File
@@ -437,7 +437,7 @@ loadAmmoTut = do
=<< shuffleLinks
=<< roomRectAutoLights 100 100
droom <- distributerRoom BulletAmmo (10 ^ (8::Int))
croom <- roomCCrits 2
croom <- roomCCrits 1
return $
tToBTree "loadAmmoTest" $
treePost
+3 -1
View File
@@ -1,6 +1,7 @@
{-# OPTIONS_GHC -Wno-unused-imports #-}
module Dodge.TestString where
import Dodge.Creature.Picture
import Dodge.WallCreatureCollisions
import Data.List ((\\))
import ShortShow
@@ -34,7 +35,8 @@ import Data.Monoid
import RandomHelp
testStringInit :: Universe -> [String]
testStringInit u = fmap show $ u ^.. uvWorld . cWorld . lWorld . creatures . ix 0 . crWallTouch . each
testStringInit u = -- fmap show (u ^.. uvWorld . cWorld . lWorld . creatures . ix 0 . crWallTouch . each)
(fmap show $ u ^.. uvWorld . cWorld . lWorld . creatures . each . crStance . carriage)
-- (fmap show $ u ^.. uvWorld . cWorld . lWorld . creatures . each . crStance . carriage . strideAmount)
-- a <> fromMaybe [] (do
-- a w1 <- u ^? uvWorld . cWorld . lWorld . walls . ix 18
+22 -21
View File
@@ -2642,7 +2642,7 @@ argV src/Geometry/Vector.hs 83;" f
armourChaseCrit src/Dodge/Creature/ArmourChase.hs 34;" f
armouredChasers src/Dodge/Room/Boss.hs 58;" f
armouredCorridor src/Dodge/Room/RoadBlock.hs 20;" f
arms src/Dodge/Creature/Picture.hs 100;" f
arms src/Dodge/Creature/Picture.hs 124;" f
arrow src/Picture/Composite.hs 19;" f
arrowPath src/Picture/Composite.hs 8;" f
assignHotkey src/Dodge/AssignHotkey.hs 9;" f
@@ -2694,14 +2694,14 @@ baseItemTriggerType src/Dodge/BaseTriggerType.hs 21;" f
baseRifleShape src/Dodge/Item/Draw/SPic.hs 324;" f
baseRodShape src/Dodge/Item/Draw/SPic.hs 407;" f
baseSMGShape src/Dodge/Item/Draw/SPic.hs 395;" f
baseShoulder src/Dodge/Creature/Picture.hs 138;" f
baseShoulder src/Dodge/Creature/Picture.hs 162;" f
baseStickShape src/Dodge/Item/Draw/SPic.hs 301;" f
baseStickShapeX src/Dodge/Item/Draw/SPic.hs 293;" f
baseStickSpread src/Dodge/HeldUse.hs 346;" f
basicAttentionUpdate src/Dodge/Creature/Perception.hs 127;" f
basicAwarenessUpdate src/Dodge/Creature/Perception.hs 39;" f
basicCrPict src/Dodge/Creature/Picture.hs 32;" f
basicCrShape src/Dodge/Creature/Picture.hs 38;" f
basicCrPict src/Dodge/Creature/Picture.hs 33;" f
basicCrShape src/Dodge/Creature/Picture.hs 39;" f
basicItemDisplay src/Dodge/Item/Display.hs 23;" f
basicMachineApplyDamage src/Dodge/Machine/Damage.hs 6;" f
basicMuzFlare src/Dodge/HeldUse.hs 731;" f
@@ -2819,7 +2819,7 @@ chaseCritInternal src/Dodge/Humanoid.hs 8;" f
chaseCritMv src/Dodge/Creature/ReaderUpdate.hs 122;" f
chaseCritPerceptionUpdate src/Dodge/Creature/Perception.hs 32;" f
chaseCritVocalization src/Dodge/Creature/ChaseCrit.hs 36;" f
chaseUpperBody src/Dodge/Creature/Picture.hs 63;" f
chaseUpperBody src/Dodge/Creature/Picture.hs 64;" f
chasmRotate src/Dodge/Creature/Update.hs 177;" f
chasmSimpleMaze src/Dodge/Room/Tutorial.hs 371;" f
chasmSpitTerminal src/Dodge/Room/Tutorial.hs 305;" f
@@ -2958,7 +2958,7 @@ corridorWallN src/Dodge/Room/Corridor.hs 77;" f
crAdd src/Dodge/Room/RezBox.hs 116;" f
crAwayFromPost src/Dodge/Creature/Test.hs 83;" f
crBlips src/Dodge/RadarSweep.hs 88;" f
crCamouflage src/Dodge/Creature/Picture.hs 35;" f
crCamouflage src/Dodge/Creature/Picture.hs 36;" f
crCanSeeCr src/Dodge/Creature/Test.hs 50;" f
crCrSpring src/Dodge/Update.hs 978;" f
crCurrentEquipment src/Dodge/Creature/Statistics.hs 59;" f
@@ -3099,10 +3099,10 @@ dbwMuzzles src/Dodge/HeldUse.hs 349;" f
deZoneIX src/Dodge/Zoning/Base.hs 91;" f
deZoneWall src/Dodge/Zoning/Wall.hs 69;" f
deadEndRoom src/Dodge/Room/Room.hs 262;" f
deadFeet src/Dodge/Creature/Picture.hs 96;" f
deadRot src/Dodge/Creature/Picture.hs 114;" f
deadScalp src/Dodge/Creature/Picture.hs 109;" f
deadUpperBody src/Dodge/Creature/Picture.hs 135;" f
deadFeet src/Dodge/Creature/Picture.hs 120;" f
deadRot src/Dodge/Creature/Picture.hs 138;" f
deadScalp src/Dodge/Creature/Picture.hs 133;" f
deadUpperBody src/Dodge/Creature/Picture.hs 159;" f
debrisS src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 725;" f
debrisSPic src/Dodge/Prop/Draw.hs 17;" f
debrisSize src/Dodge/Block/Debris.hs 125;" f
@@ -3325,7 +3325,7 @@ drawBoundingBox src/Dodge/Debug/Picture.hs 368;" f
drawBullet src/Dodge/Render/ShapePicture.hs 176;" f
drawButton src/Dodge/Button/Draw.hs 11;" f
drawCPUShadows src/Dodge/Render/Shadow.hs 19;" f
drawChaseCrit src/Dodge/Creature/Picture.hs 53;" f
drawChaseCrit src/Dodge/Creature/Picture.hs 54;" f
drawCircCollisionTest src/Dodge/Debug/Picture.hs 118;" f
drawCliff src/Dodge/Render/ShapePicture.hs 87;" f
drawCollisionTest src/Dodge/Debug/Picture.hs 103;" f
@@ -3354,7 +3354,7 @@ drawDragSelecting src/Dodge/Render/HUD.hs 162;" f
drawDumbSwitch src/Dodge/Button/Draw.hs 31;" f
drawEmptySet src/Dodge/Render/Picture.hs 151;" f
drawEnergyBall src/Dodge/EnergyBall/Draw.hs 7;" f
drawEquipment src/Dodge/Creature/Picture.hs 147;" f
drawEquipment src/Dodge/Creature/Picture.hs 171;" f
drawExamineInventory src/Dodge/Render/HUD.hs 199;" f
drawExplosiveBall src/Dodge/EnergyBall/Draw.hs 15;" f
drawFarWallDetect src/Dodge/Debug/Picture.hs 271;" f
@@ -3533,7 +3533,8 @@ faceEdges src/Polyhedra.hs 62;" f
facesToVF src/Polyhedra/Geodesic.hs 70;" f
farWallDistDirection src/Dodge/Update/Camera.hs 245;" f
fdiv src/ShortShow.hs 41;" f
feet src/Dodge/Creature/Picture.hs 82;" f
feet src/Dodge/Creature/Picture.hs 93;" f
ffeet src/Dodge/Creature/Picture.hs 107;" f
filter3 src/FoldableHelp.hs 76;" f
filterSectionsPair src/Dodge/DisplayInventory.hs 160;" f
findBlips src/Dodge/RadarSweep.hs 63;" f
@@ -4350,7 +4351,7 @@ oldMachineBootS src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 635;" f
onEquipWristShield src/Dodge/Euse.hs 89;" f
onRemoveWristShield src/Dodge/Euse.hs 79;" f
oneH src/Dodge/Creature/Test.hs 95;" f
oneSmooth src/Dodge/Creature/Picture.hs 79;" f
oneSmooth src/Dodge/Creature/Picture.hs 90;" f
openConsole src/Dodge/Update.hs 138;" f
optionMenu src/Dodge/Menu.hs 110;" f
optionScreenDefaultEffect src/Dodge/Update/Input/ScreenLayer.hs 62;" f
@@ -4833,7 +4834,7 @@ scale3 src/Picture/Base.hs 137;" f
scaleMat src/MatrixHelper.hs 71;" f
scaleMatrix src/MatrixHelper.hs 68;" f
scaleSH src/Shape.hs 266;" f
scalp src/Dodge/Creature/Picture.hs 123;" f
scalp src/Dodge/Creature/Picture.hs 147;" f
scancodeToHotkey src/Dodge/Creature/YourControl.hs 82;" f
scodeToChar src/Dodge/ScodeToChar.hs 6;" f
scorchSPic src/Dodge/Creature/Update.hs 126;" f
@@ -4992,10 +4993,10 @@ showEquipItem src/Dodge/Item/Display.hs 108;" f
showInt src/Dodge/Item/Info.hs 75;" f
showIntsString src/Dodge/Tree/Compose.hs 130;" f
showInventoryPathing src/Dodge/Item/Display.hs 86;" f
showManObj src/Dodge/TestString.hs 75;" f
showManObj src/Dodge/TestString.hs 78;" f
showMuzzlePositions src/Dodge/Debug.hs 292;" f
showTerminalError src/Dodge/Debug/Terminal.hs 80;" f
showTimeFlow src/Dodge/TestString.hs 85;" f
showTimeFlow src/Dodge/TestString.hs 88;" f
shrinkPolyOnEdges src/Geometry/Polygon.hs 198;" f
shrinkVert src/Geometry/Polygon.hs 202;" f
shuffle src/RandomHelp.hs 68;" f
@@ -5221,7 +5222,7 @@ testEvent src/Dodge/Event/Test.hs 11;" f
testInventory src/Dodge/Creature.hs 307;" f
testPic src/Dodge/Render/ShapePicture.hs 57;" f
testSPic src/Dodge/Render/ShapePicture.hs 54;" f
testStringInit src/Dodge/TestString.hs 36;" f
testStringInit src/Dodge/TestString.hs 37;" f
text src/Picture/Base.hs 185;" f
textGrad src/Picture/Text.hs 5;" f
textInputBlurb src/Dodge/Terminal.hs 43;" f
@@ -5299,11 +5300,11 @@ tone440sawtoothquietS src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 663;" f
topInvW src/Dodge/ListDisplayParams.hs 54;" f
topPrismEdgeIndices src/Shader/Poke.hs 335;" f
topPrismIndices src/Shader/Poke.hs 410;" f
topTestPart src/Dodge/TestString.hs 71;" f
topTestPart src/Dodge/TestString.hs 74;" f
torchShape src/Dodge/Item/Draw/SPic.hs 277;" f
torqueAmount src/Dodge/HeldUse.hs 606;" f
torqueCr src/Dodge/WorldEffect.hs 85;" f
torso src/Dodge/Creature/Picture.hs 128;" f
torso src/Dodge/Creature/Picture.hs 152;" f
tractCr src/Dodge/TractorBeam/Update.hs 28;" f
tractFlIt src/Dodge/TractorBeam/Update.hs 23;" f
tractorBeamAt src/Dodge/HeldUse.hs 850;" f
@@ -5533,7 +5534,7 @@ updateWheelEvent src/Dodge/Update/Scroll.hs 21;" f
updateWheelEvents src/Dodge/Update.hs 474;" f
updateWorldEventFlag src/Dodge/Update.hs 127;" f
updateWorldEventFlags src/Dodge/Update.hs 115;" f
upperBody src/Dodge/Creature/Picture.hs 143;" f
upperBody src/Dodge/Creature/Picture.hs 167;" f
upperBox src/Shape.hs 153;" f
upperBoxHalf src/Shape.hs 219;" f
upperBoxMT src/Shape.hs 144;" f