[Javamud-developers] Major bug fixed
Status: Beta
Brought to you by:
u_davis
From: <da...@ni...> - 2003-10-02 15:06:04
|
Hi all! Please update your sources from the CVS. I fixed a bug that concerns the player objects in the game. Bug number is: #816620. Read the problem, investigation note and fix. I also copy-pasted the notes in this email: -----------------------------8<--------------------------------------------- Investigation note ------------------ After long hours of debugging I found out that the actual problem is in the driver itself.When the driver creates a client object, it has ID of "". The ID is set in the client.java run() method, but the problem is that the object is added to the list of objects before that, so when it is looked up, it will be found with driver.query_object_by_id("");. The client.java's heal() method looks for opponent, which in the beginning is set to empty string (""), in which case it founds the client object, so the client will try to attack itself.Also the wholist problem comes because of this empty id, the player objects are overwritten, so they cannot be seen anymore.I didn't notice this problem before because of a multithreading issue, this problems cannot appear on faster processors. Proposed fix ------------ Set the client's ID before adding it to the object list in the driver.java's main() method.---------------------------------------8<----------------------------------- regards Istvan David |