Not logged inOpenClonk Forum
Up Topic Development / Developer's Corner / The DFA_THROW Procedure
- - By boni [at] Date 2012-05-07 18:55 Edited 2012-05-07 19:57
As I took a look at http://bugs.openclonk.org/view.php?id=765 I discovered that the Stand-Action actually uses the THROW-Procedure. Maikel told me that THROW is equivalent to standing, so maybe we should rename it to DFA_STAND? Is it save to do so, or anything speaking against it/breaks when I do so? (besides the scripts using DFA_THROW of course)
Else, why do we still have a THROW procedure? Throwing is done in script afaik.

Secondly I'm wondering why that bug occurs. The clonk keeps moving (walking?) into the direction it was moving before when I set the Action Stand mid-walking. Is this intended? I'd expect the clonk to stop, when I set the Stand-Action/Procedure.

Edit:
Apparently Throwing is done in the engine.
Parent - - By Zapper [de] Date 2012-05-07 19:35
I think you should rather set the com dir of the Clonk to COMD_Stop instead of manipulating the actions directly (I believe the Clonk has a lot of script to care for the walking/standing actions)
Parent - - By boni [at] Date 2012-05-07 19:57 Edited 2012-05-07 20:19
Tried that.
clonk->SetAction("Stand");
clonk->SetComDir(COMD_Stop);

Still moved.
Parent - - By Zapper [de] Date 2012-05-07 20:01
SetComDir instead of SetCommand, right?
Parent - By boni [at] Date 2012-05-07 20:19
Of course. Fixed. %(
Parent - - By Sven2 [de] Date 2012-05-07 23:19 Edited 2012-05-07 23:27
There is some engine logic on throwing, but I'm pretty sure it's not related to DFA_THROW (except the Throw action was probably the first usage of that procedure). I don't know if OC still uses that. THROW in CR is used for many actions that require standing still for instance when casting magic spells.

The main effects of DFA_THROW are in physics behaviour of the Clonk (e.g., stops horizontal movement) and incoming control handling (doesn't apply for OC any more). Fun fact: ThrowSpear of the CR knight does not have a THROW procedure. This allows for some crazy stuff you only need to know if you play Tower of Despair ;)

So, yes, DFA_Stand would make sense.
Parent - By boni [at] Date 2012-05-08 07:53

>The main effects of DFA_THROW are in physics behaviour of the Clonk (e.g., stops horizontal movement)


Then it's an engine bug, that the clonk keeps moving when you set the Stand action. (see bug I posted in the OP)
Parent - By Newton [de] Date 2012-05-08 08:50

> crazy stuff you only need to know if you play Tower of Despair ;)


SPOILER!

I had the impression that the guys over at the german clonk forum are desperate for some hints ;-)
Up Topic Development / Developer's Corner / The DFA_THROW Procedure

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill