minor bug in mapreader.cpp
Forum rules
This forum houses many years of development, tracing back to some of the earliest posts that exist on the board.
Its current use is for the continued development of the server and game it has always served: TMW Classic.
minor bug in mapreader.cpp
In the mapreader.cpp there is this code:
if (objType == "WARP" || objType == "NPC" ||
objType == "SCRIPT" || objType == "SPAWN")
{
// Silently skip server-side objects.
continue;
}
But many maps has "warp" or "Warp" in it so it sometimes work but sometimes don't. I'm not sure what that code is for, but I think it doesn't work as it was intended. Some uppercase on objType maybe?
Maybe it was fixed meanwhile, i use 0.0.29.1, so ignore it.
if (objType == "WARP" || objType == "NPC" ||
objType == "SCRIPT" || objType == "SPAWN")
{
// Silently skip server-side objects.
continue;
}
But many maps has "warp" or "Warp" in it so it sometimes work but sometimes don't. I'm not sure what that code is for, but I think it doesn't work as it was intended. Some uppercase on objType maybe?
Maybe it was fixed meanwhile, i use 0.0.29.1, so ignore it.
Re: minor bug in mapreader.cpp
IIRC objType is converted to uppercase in the XML reading level
<Kage_Jittai> ... are you saying I am elite
<thorbjorn> Yes.
<thorbjorn> Yes.
Re: minor bug in mapreader.cpp
It is not in 0.0.29.1, because I found this bug exactly because it was not lower/upper cased, was it fixed later?
Add this:
std::cout << "objType = " << objType << std::endl;
Enter desert under tulishmar, you will see this:
Load map maps/002-1.tmx
objType = WARP
objType = SPAWN
objType = NPC
objType = NPC
objType = NPC
objType = NPC
objType = NPC
objType = SCRIPT
objType = WARP
objType = WARP
objType = WARP
objType = warp <------ here, you see? Im not lying!
objType = spawn
objType = spawn
objType = spawn
objType = spawn
objType = spawn
objType = spawn
objType = spawn
objType = spawn
objType = spawn
objType = spawn
objType = spawn
objType = spawn
objType = spawn
Add this:
std::cout << "objType = " << objType << std::endl;
Enter desert under tulishmar, you will see this:
Load map maps/002-1.tmx
objType = WARP
objType = SPAWN
objType = NPC
objType = NPC
objType = NPC
objType = NPC
objType = NPC
objType = SCRIPT
objType = WARP
objType = WARP
objType = WARP
objType = warp <------ here, you see? Im not lying!
objType = spawn
objType = spawn
objType = spawn
objType = spawn
objType = spawn
objType = spawn
objType = spawn
objType = spawn
objType = spawn
objType = spawn
objType = spawn
objType = spawn
objType = spawn
Re: minor bug in mapreader.cpp
I fixed it with this patch: http://gitorious.org/mana/mana/commit/4 ... 016b544633
You should be able to adapt that patch to be able to apply to 0.0.29.1 if you want to decrease warnings or something.
You should be able to adapt that patch to be able to apply to 0.0.29.1 if you want to decrease warnings or something.
<Kage_Jittai> ... are you saying I am elite
<thorbjorn> Yes.
<thorbjorn> Yes.
Re: minor bug in mapreader.cpp
No bitching intended but:
> src/utils/stringutils.h:45
> Converts the given strong to upper case
> src/utils/stringutils.h:45
> Converts the given strong to upper case
- Freeyorp101
- Archivist Prime
- Posts: 766
- Joined: 04 Nov 2008, 09:17
- Location: New Zealand
Re: minor bug in mapreader.cpp
[Fixed.]zefram wrote:No bitching intended but:
> src/utils/stringutils.h:45
> Converts the given strong to upper case
Thanks for reporting
---Freeyorp
(09:58:17) < tux9th> Freeyorp: your sig on the forums is kind of outdated