Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Compiling NPCs for SMOD. Fix for crashes and broken ragdolls  (Read 734 times)

0 Members and 1 Guest are viewing this topic.

Offline BIZ

  • 32-Bit Hobo
  • *
  • *
  • +0% chance to make useful post
  • BIZ hides in shadows.
    • BSNOOCH.COM
Compiling NPCs for SMOD. Fix for crashes and broken ragdolls
« on: January 13, 2021, 05:44:48 AM »
I know not many are compiling NPCs for SMOD anymore, but if you are, you may have run into some issues recently like the game crashing on NPC death.

For some reason the old version of the source engine that SMOD uses does not like some of the QC commands that Crowbar spits out.

One that was bothering me was:

ikrule "rhand" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 1 1 target 0

This will be generated on any $sequences in the QC file. I'm happy to report that you can safely delete this ikrule command to fix the errors/crashes.

Below is an example of a problem $sequence that crowbar generates on decompile.

Code: [Select]
$sequence "ragdoll" {
"female_01_anims\ragdoll.smd"
activity "ACT_DIERAGDOLL" 1
fadein 0.2
fadeout 0.2
fps 30
ikrule "rhand" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 1 1 target 0
ikrule "lhand" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 1 1 target 1
ikrule "rfoot" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 1 1 target 2
ikrule "lfoot" release contact 0 fakeorigin 0 0 0 fakerotate 0 0 0 floor 0 height 0 radius 0 range 0 0 1 1 target 3
}

Below would be the corrected sequence to prevent crashing when the npc dies or is gibbed:

Code: [Select]
$sequence "ragdoll" {
"female_01_anims\ragdoll.smd"
activity "ACT_DIERAGDOLL" 1
fadein 0.2
fadeout 0.2
fps 30
}
« Last Edit: January 13, 2021, 06:11:05 AM by BIZ »

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal