Page 1 of 1

Moving block_path/block_radius

Posted: Wed Mar 23, 2011 3:30 pm
by yufra
This idea came from talking with tiger_eye while he worked on this: http://forums.te4.org/viewtopic.php?f=4 ... 61&start=0

Currently if you want to modify the behavior of block_path/block_radius you can drop in an entirely new function easily, but if you just want to TWEAK the original it can become complicated and either you end up copying/pasting or creating a dummy target type to grab the original function. I suggest moving the default block_path/block_radius functions into the engine.Target namespace, and referring back to those functions in Target:getType. That way you could call engine.Target.default_block_path from somewhere else. Thoughts?

EDIT: I didn't post a patch since I know tiger_eye's patch isn't in the SVN yet. I can post one after those changes go in if you want.

Re: Moving block_path/block_radius

Posted: Wed Mar 23, 2011 3:34 pm
by darkgod
You have to make sure this wont bork when saving with projectiles in the air but it shouldbe good

Re: Moving block_path/block_radius

Posted: Wed Mar 23, 2011 3:39 pm
by yufra
Good point... stupid projectiles! :D