Open mabre opened 10 years ago
@mabre Weren't the labels fixed on master? Or was it on another branch and this is why it didn't come along with the merge?
Which labels? The “What will xxx do?” label is fixed.
Sry, the ones over the heads, weren't they centered?
No, there hasn’t been a fix for it, but should be fixed with #99.
There are stil some networkproblems:
I always have these problems when checking out items
:
Exception in thread "Thread-4" de.hhu.propra.team61.io.json.JSONException: JSONObject["inventory"] not found.
)Exception in thread "JavaFX Application Thread" de.hhu.propra.team61.io.json.JSONException: JSONArray[4] not found.
for items.add(new Medipack(inventory.getInt(4)));
Projectiles not always removed from screen
At least for network game: You send the index in the array list which is supposed to be removed. But after executing the first remove command, the indexes of all the other projectiles are decreased, so the following commands are not executed correctly.
Falldamage seems to differ from client to client
Is this still reproducable?
Exceptions: Those problems are caused due to my inventory changes and the gui not having been updated(Might also have forgotten some gamestyles). I was waiting a bit for the lvl-editor, since the guichanges are in there.
Projectiles : Any suggestion to fix the index problem?
Falldamage: Yes, as of my branches' state this is still a problem
@mabre In which Branch did you add the variable to differ the clients from each other? This will be necessary for the Inventorydisplay
client.getAssociatedTeam()
is available on your branch.
A sudden idea I had this night: As Server.sendCommand()
is static, we can use it even if the server object is not available (eg. in explosion handling), so passing those ArrayLists around might actually be unnecessary.
I'll try that out later, it would actually be pretty helpful
For the projectiles: maybe add a random id to the projectiles and remove them by id.
For the rifle:
int xOffset = NORMED_OBJECT_SIZE / 2;
int yOffset = NORMED_OBJECT_SIZE / 2;
//draw relatively from there
redDot.setStartX(0);
redDot.setStartY(0);
redDot.setEndX(100);
double endY = 100 * Math.sin(toRadian(getAngle()));
redDot.setEndY(endY);
//set absolute position
redDot.setTranslateX(itemImage.getTranslateX());
redDot.setTranslateY(itemImage.getTranslateY() + Math.min(endY,0) + yOffset); // move the upper end of the canvas (wherever this comes from), so that the line does not tilt away
@Jessypet Where in the Netlobby are the weapons loaded/saved into again? I am somehow unable them manually or by random searching with STRG+F
They are actually not loaded anywhere and saved in toJson() where you created the long JSONArray. If you want to save the number of projectiles entered in customize you can create aJSONObject via CustomizeManager.getSavedSettings("gamestyles/"+the wanted game style) and load the JSONArray "inventory"
Ah thanks, that is exactly, what I needed^^
@Jessypet in the munitioneditor we are lacking the "Digiwise"
Later:
Feel free to give further ideas or report bugs etc