Implementing the restructure changes
Collapse
X
-
There are actually a number of things I don't like about floor_carry() and drop_near() - handling of mimics being a big one. I think I will rework those to be more sensible.Leave a comment:
-
The client part now also compiles cleanly, and I can even manage to create a character and save its state on the server. Levels are nicely generated, object lists seem to work fine. The only problem is that equipment/inventory is totally fucked up...Leave a comment:
-
The server part compiles cleanly, runs and saves its state perfectly. Now to the client part...Leave a comment:
-
All 78/78 files now ported. Next step is to adapt the remaining PWMAngband code and try to compile.Leave a comment:
-
That's amusing - looks like that was mainly used when iterating through the object list. No longer needed now there's no object list, but I probably won't remove it right away.Leave a comment:
-
44/78 files ported. I hope I'm not ruining the whole code in the process...Leave a comment:
-
In fact this happens very often, because of drop_near(). Objects that break or that cannot be placed up to three spaces away on a pile (except artifacts) are not dropped on the ground either (as per floor_carry). In this case, the corresponding memory is not freed.Leave a comment:
-
floor_carry() never deletes the "drop" object if it fails. This should really rarely happen (probably only if a character spends enough time on a level to fill every square with a pile of objects), but the code probably should handle the case.Leave a comment:
-
make_fake_artifact() creates a copy of an object, which may allocate memory for slays and brands. The object -- even if created as a local structure "object_type_body" -- should still be freed.Leave a comment:
-
In obj_known_damage(), the "obj" variable inside a loop masks the "obj" parameter. This probably gives a compilation warning.Leave a comment:
-
Looking at the latest code, it seems that held_m_idx (on objects) is declared (and set) but never used anywhere.Leave a comment:
-
rd_objects_aux() uses rd_item directly. I guess it could use the rd_item_version parameter instead...
Anyway, 23/78 files ported
Leave a comment:
-
The correct thing for V to do - and I am hoping to get it done before 4.1 - is to move all the known player stuff to cave_k and gear_k. This should make it easier for your variant, because then the client side should know exactly cave_k and gear_k (which contain everything about the player's knowledge of stuff), whereas the server knows cave and gear (completely, and there's no need to mess around with putting knowledge info on anything).First thing I've done is move the chunk o_idx array inside the square structure, like it was done for monsters. By doing that, I've spotted a bigger problem that will probably prevent me from moving to linked lists: the array of marked objects for each player.
In Vanilla, the "marked" flag is on each object, and it's a simple byte. In PWMAngband, it is on each player, and it's an array of bytes indexed by object id. unfortunately, there's no way I can get around that easily...
It's fairly amazing that you're managed to implement everything - and also very useful to me.Leave a comment:
-
Piles of objects are now fully functionnal in PWMAngband... I think. Time to make a backup save of the source and start implementing the change...Leave a comment:
Leave a comment: