Maybe... a Bug?
Moderator: Forum Moderators
Forum rules
Before reporting issues in this section, you must read the following topic:
Before reporting issues in this section, you must read the following topic:
Maybe... a Bug?
Hi to all...
I want to expose a strange situation that take effect using teleport feature.
I have a [set_menu_item] with possibility for player's leaders to "teleport" themself around the map.
Scenario is a 1 vs 1 battle (so we have only 2 players)
I used this code:
At first a MACRO to find the coordinates of side leader:
then the code to teleport unit.... into the new location:
The teleport event works... PERFECTLY... but something strange happens when the leader unit is teleported over a village:
If Player 1 leader is teleported on an empty village this become... OWNED by ENEMY (player 2!)
If Player 2 leader is teleported on an empty village, this last remain the same... (not owned by any players!!)
Maybe a Wesnoth Bug...???!!!
Thanks!
Bye
I want to expose a strange situation that take effect using teleport feature.
I have a [set_menu_item] with possibility for player's leaders to "teleport" themself around the map.
Scenario is a 1 vs 1 battle (so we have only 2 players)
I used this code:
At first a MACRO to find the coordinates of side leader:
Code: Select all
#define FIND_COO_LEADERS SIDE VAR1 TO_VAR1 VAR2 TO_VAR2
[store_unit]
[filter]
side={SIDE}
canrecruit=yes
[/filter]
kill=no
variable=leader_pos
[/store_unit]
[set_variable]
name={TO_VAR1}
format=$leader_pos.{VAR1}
[/set_variable]
[set_variable]
name={TO_VAR2}
format=$leader_pos.{VAR2}
[/set_variable]
[clear_variable]
name=leader_pos
[/clear_variable]
#enddef
Code: Select all
{FIND_COO_LEADERS $side_number x Lx y Ly}
{TELEPORT_UNIT (x,y=$Lx,$Ly side=$side_number canrecruit=yes) $x1 $y1}
{FLOATING_TEXT x,y=$x1,$y1 0,0,255 "BLINK!"}
If Player 1 leader is teleported on an empty village this become... OWNED by ENEMY (player 2!)
If Player 2 leader is teleported on an empty village, this last remain the same... (not owned by any players!!)
Maybe a Wesnoth Bug...???!!!
Thanks!
Bye
Last edited by Dret on May 7th, 2008, 12:15 am, edited 1 time in total.
Re: Maybe... a Bug?
sounds like a bug
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
Re: Maybe... a Bug?
Do You suggest me to send a report to code developers...??
Re: Maybe... a Bug?
yes, those silly "developer" people probably want to know about it
bugs.wesnoth.org
bugs.wesnoth.org
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
Re: Maybe... a Bug?
Huh?Sapient wrote:yes, those silly "developer" people...
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
Re: Maybe... a Bug?
It looks like a +/-1 offset somewhere in the C++ code (internal side number = WML & displayed side number -1 IIRC)...
Probably easy to fix (if it hasn't been fixed yet in SVN ).
Probably easy to fix (if it hasn't been fixed yet in SVN ).
"Ooh, man, my mage had a 30% chance to miss, but he still managed to hit! Awesome!" -- xtifr
Re: Maybe... a Bug?
I fixed this bug, so it will be fixed in the next available scenarios.
Note that this might produce OOS error on scenarios that use [teleport] to a village with 1.4.3+ and 1.4.2- clients, anyway i'm not aware of any (and for this reason it might be reverted before 1.4.3 if other devs feel unconfortable with this minor incompatibility).
Note that this might produce OOS error on scenarios that use [teleport] to a village with 1.4.3+ and 1.4.2- clients, anyway i'm not aware of any (and for this reason it might be reverted before 1.4.3 if other devs feel unconfortable with this minor incompatibility).
"Ooh, man, my mage had a 30% chance to miss, but he still managed to hit! Awesome!" -- xtifr