Topic Some Questions about Source Code
This board is threaded (i.e. has a tree structure). Please use the Reply button of the specific post you are referring to, not just any random button. If you want to reply to the topic in general, use the Post button near the top and bottom of the page.
In Response to Zapper
I don't think you'll have to dig that deep into the engine to do whatever you want.
Most of the control stuff is in script nowadays.
Shoveling speed:
General speed: https://git.openclonk.org/openclonk.git/blob/HEAD:/planet/Objects.ocd/Clonk.ocd/Script.c#l867
The speed change during digging: https://git.openclonk.org/openclonk.git/blob/HEAD:/planet/Objects.ocd/Items.ocd/Tools.ocd/Shovel.ocd/Script.c#l131
Tree-cutting speed:
The speed is determined by how quickly the necessary damage is dealt to the tree. The damage is determined by
https://git.openclonk.org/openclonk.git/blob/HEAD:/planet/Objects.ocd/Items.ocd/Tools.ocd/Axe.ocd/Script.c#l207
The bow stuff (or aiming in general) is handled by our aim manager library. The bow just tells the library how it wants to be treated here:
https://git.openclonk.org/openclonk.git/blob/HEAD:/planet/Objects.ocd/Items.ocd/Weapons.ocd/Bow.ocd/Script.c#l32
Most of the control stuff is in script nowadays.
Shoveling speed:
General speed: https://git.openclonk.org/openclonk.git/blob/HEAD:/planet/Objects.ocd/Clonk.ocd/Script.c#l867
The speed change during digging: https://git.openclonk.org/openclonk.git/blob/HEAD:/planet/Objects.ocd/Items.ocd/Tools.ocd/Shovel.ocd/Script.c#l131
Tree-cutting speed:
The speed is determined by how quickly the necessary damage is dealt to the tree. The damage is determined by
Axe.ChopStrength
, as outlined here:https://git.openclonk.org/openclonk.git/blob/HEAD:/planet/Objects.ocd/Items.ocd/Tools.ocd/Axe.ocd/Script.c#l207
The bow stuff (or aiming in general) is handled by our aim manager library. The bow just tells the library how it wants to be treated here:
https://git.openclonk.org/openclonk.git/blob/HEAD:/planet/Objects.ocd/Items.ocd/Weapons.ocd/Bow.ocd/Script.c#l32
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill