Hi,
I am trying to add 2 animations for an iron-sight effect (going into iron-sight mode, and going back to normal mode) in multiplayer hl2dm. So I start by looking in the model's .qc file and find:
$sequence toiron "toiron" ACT_VM_TOIRON 1 snap fps 30.00
$sequence tonormal "tonormal" ACT_VM_TONORMAL 1 snap fps 30.00
Then I added them to the enum list in ai_activity.h (tried these both ways):
ACT_VM_TOIRON,
ACT_VM_TONORMAL,
ACT_VM_TOIRON_FN2000,
ACT_VM_TONORMAL_FN2000,
Then in activitylist.cpp I added:
REGISTER_SHARED_ACTIVITY ( ACT_VM_TOIRON );
REGISTER_SHARED_ACTIVITY ( ACT_VM_TONORMAL );
Then I added to the acttable_t in the weapon source file (modified weapon_smg1.cpp)
{ ACT_HL2MP_JUMP, ACT_HL2MP_JUMP_SMG1, false },
{ ACT_RANGE_ATTACK1, ACT_RANGE_ATTACK_SMG1, false },
{ ACT_VM_TOIRON, ACT_VM_TOIRON_FN2000, false },
{ ACT_VM_TONORMAL, ACT_VM_TONORMAL_FN2000, false },
I also made a toggle so I could see the animations in action, and indeed the animation played on the toggle. But when I tried firing and nothing happened. I was able to drop the weapon and pick it up again, switch to other weapons without crashing, just could not fire.
After commenting out the code that actually plays the animation, the weapon still would not fire. So something is being registered wrong with the engine, as the above changes are all that were made and it still is not firing. Any ideas?
I am trying to add 2 animations for an iron-sight effect (going into iron-sight mode, and going back to normal mode) in multiplayer hl2dm. So I start by looking in the model's .qc file and find:
$sequence toiron "toiron" ACT_VM_TOIRON 1 snap fps 30.00
$sequence tonormal "tonormal" ACT_VM_TONORMAL 1 snap fps 30.00
Then I added them to the enum list in ai_activity.h (tried these both ways):
ACT_VM_TOIRON,
ACT_VM_TONORMAL,
ACT_VM_TOIRON_FN2000,
ACT_VM_TONORMAL_FN2000,
Then in activitylist.cpp I added:
REGISTER_SHARED_ACTIVITY ( ACT_VM_TOIRON );
REGISTER_SHARED_ACTIVITY ( ACT_VM_TONORMAL );
Then I added to the acttable_t in the weapon source file (modified weapon_smg1.cpp)
{ ACT_HL2MP_JUMP, ACT_HL2MP_JUMP_SMG1, false },
{ ACT_RANGE_ATTACK1, ACT_RANGE_ATTACK_SMG1, false },
{ ACT_VM_TOIRON, ACT_VM_TOIRON_FN2000, false },
{ ACT_VM_TONORMAL, ACT_VM_TONORMAL_FN2000, false },
I also made a toggle so I could see the animations in action, and indeed the animation played on the toggle. But when I tried firing and nothing happened. I was able to drop the weapon and pick it up again, switch to other weapons without crashing, just could not fire.
After commenting out the code that actually plays the animation, the weapon still would not fire. So something is being registered wrong with the engine, as the above changes are all that were made and it still is not firing. Any ideas?