Comments (4)
Overridden map game type -- are you setting bot_mapgametype in ghost.cfg? It shouldn't be overridden, the code looks like this (bnet.cpp):
uint32_t MapGameType = map->GetMapGameType( );
MapGameType |= MAPGAMETYPE_UNKNOWN0;
//Apply overwrite if not equal to 0
MapGameType = ( m_GHost->m_MapGameType != 0 ) ? MapGameType : m_GHost->m_MapGameType;
if( state == GAME_PRIVATE )
MapGameType |= MAPGAMETYPE_PRIVATEGAME;
So initially MapGameType is set based on the map, but if m_GHost->m_MapGameType is nonzero, then m_GHost->m_MapGameType is used.
It might be useful to debug a bit what caused the overriding problem since that may be related to the second issue. You could add a CONSOLE_Print statement after the code above to print MapGameType, m_GHost->m_MapGameType, and map->GetMapGameType( ).
Note: you may want to convert the number to binary so you can see exactly what flags are getting set. You can just google "XYZ in binary".
For map authorized error, one way to debug it would be to see what the map game type reported by actual WC3 client is. So you run Wireshark, host the map in WC3 client, and then look for the SID_STARTADVEX3 TCP packets, which should start with 0xFF (header constant) and then 0x1C (SID_STARTADVEX3).
Another thing to check is map_path should be something like Maps(2)BootyBay.w3m; it should not be in Maps\Download, and should use backslashes.
Also, do you get "failed to authorize the map" if you use a map configuration file like this, without overriding the map game type?
map_path = Maps\(2)BootyBay.w3m
map_localpath = (2)BootyBay.w3m
map_options = 4
# blizzard maker
map_filter_maker = 2
# melee map
map_filter_type = 1
Note that the map_filter_maker option makes GHost++ automatically compute a map game type that includes the (1 << 14) MAPGAMETYPE_MAKERBLIZZARD flag, which is probably the flag in the map game type that makes it show up more often (perhaps gets put in a different bucket of games, and shows up just because so few games with Blizzard maps are being hosted).
from ghostpp.
Hi,
first of all: thanks for your great work!
I'm a little bit busy at the moment, but i try to answer as fast as possible.
I think I found the bug which causes the overwriting of the mapgametype:
Line 2281 in 6a8be0a
This line checks if m_GHost->m_MapGameType is NOT zero. And if thats true (so if it doesnt equal zero) it will be overwritten by the MapGameType (which is the return value from the GetMapGameType Function). However if it's zero, it will remain zero - which doesn't make sense, does it? I think it should be the other way around, like this:
MapGameType = ( m_GHost->m_MapGameType != 0 ) ? m_GHost->m_MapGameType : MapGameType;
Thats probably the reason the bot doesn't apply the mapgametype from the config file.
Also I tried the mapconfig details you provided: One can join the games, so there's no issue. But it's not really visible then.
I also tried sniffing out the packet, but I don't really know how to read it out properly. Should be this one:
https://pastebin.com/1jUzM1XP
"test1212" is the gamename. But where can I readout the mapgametype?
Again: Thank you!
from ghostpp.
Okay it is solved now. My issue was the structure of the maps directory. Apparently it has to be the exact same as it is in the wc3 installation directory. Then the players are able to join and stay - the "failed to authorize the map" error doesn't appear anymore.
But it's probably still useful to swap the parameters in line 2281, then the bot applies what is written in the ghost.cfg.
from ghostpp.
Ah oops... thanks for the fix (I committed it)!
from ghostpp.
Related Issues (20)
- Bot Forces Re-download of Maps and Auto Kicks on Download Completion HOT 5
- `[TCPSOCKET] closed by remote host` after BNLS connect when running more than two bots from the same ip HOT 6
- Readme.md contains incorrect information HOT 8
- Kick Slot HOT 4
- Patch 1.30.2 HOT 6
- 2 Ghost Plus plus in 1PC HOT 1
- got unknown udp packet type HOT 7
- error while loading shared libraries: libcasc.so.1: cannot open shared object file: No such file or directory
- SendAllActions work is slow
- My version votestart
- Stats vulnerability HOT 37
- Admin game not visible on 1.26a Lan game HOT 2
- w3mmd and colored name HOT 1
- <1.28 game not visible HOT 1
- Recompile Ghost++ for Windows HOT 1
- Can't found game room on game list (Use Linux and WarIII 1.28F) HOT 11
- Spoofchecking isn't working? HOT 1
- my_bool isn't defined in modern mysql sources HOT 1
- Maps after a specific size not working
- Нужен Coder HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ghostpp.