ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Fri Jul 21, 2017 8:39 pm

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Mon Jan 02, 2012 10:34 am 
Offline
Spiderkin

Joined: Wed Jan 26, 2011 3:47 pm
Posts: 556
Bolts with friendlyfire=false disappear instead of passing through friendlies.
I think this should be changed or at least a new projectile type added with this functionality.

Already located a possible fix:

In engine/target.lua line 264:
Code:
            -- If we explode due to something other than terrain, then we should explode ON the tile, not before it
            elseif typ.stop_block then
               local nb = game.level.map:checkAllEntitiesCount(lx, ly, "block_move")
               if nb > 1 or (nb == 1 and game.level.map:checkAllEntities(lx, ly, "block_move") and not game.level.map:checkEntity(lx, ly, engine.Map.TERRAIN, "pass_projectile")) then
                  if for_highlights then



If local nb = game.level.map:checkAllEntitiesCount(lx, ly, "block_move") gets changed to substract the amount of actors friendly to the source actor it should work.


Top
 Profile  
 
PostPosted: Wed Feb 15, 2012 6:04 am 
Offline
Perspiring Physicist

Joined: Tue Jul 13, 2010 2:53 pm
Posts: 1332
Yeah, friendlyfire isn't so friendly with Projectiles at the moment. This is on my todo list but feel free to bump it if you don't hear from me in a while...

_________________
Quote:
<DarkGod> lets say it's intended


Top
 Profile  
 
PostPosted: Thu Mar 01, 2012 7:50 am 
Offline
Perspiring Physicist

Joined: Tue Jul 13, 2010 2:53 pm
Posts: 1332
Tiger_eye and I put some time into this and have created a "friendlybock" branch on Gitorious. You can now add a "friendlyblock=false" flag to a target definition to allow friendly actors to not stop a bolt (or other things with the "stopblock=true" flag). Please test it out!

_________________
Quote:
<DarkGod> lets say it's intended


Top
 Profile  
 
PostPosted: Thu Mar 01, 2012 5:53 pm 
Offline
Spiderkin

Joined: Wed Jan 26, 2011 3:47 pm
Posts: 556
Minor aesthetic bug: The path, when targeting, still shows tiles behind friendlies blocked in red.

But functionality seems to be ok. :D


Top
 Profile  
 
PostPosted: Fri Mar 02, 2012 9:49 pm 
Offline
Spiderkin

Joined: Wed Jan 26, 2011 3:47 pm
Posts: 556
Coding mistake by me, everything seems to be fine so far. :D


Top
 Profile  
 
PostPosted: Fri Mar 02, 2012 10:57 pm 
Offline
Perspiring Physicist

Joined: Tue Jul 13, 2010 2:53 pm
Posts: 1332
I'll be pointing this out to DG soon, so keep testing!

_________________
Quote:
<DarkGod> lets say it's intended


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group