Atrinik Server  4.0
Todo List
Global cast_create_food (object *op, object *caster, int dir, const char *stringarg)
Looping the global arch table is not an ideal case in terms of performance...
Global cast_dust (object *op, object *throw_ob, int dir)
This function needs to be rewritten. Works for area effect spells only now.
Parameters
opObject throwing.
throw_obWhat to throw.
dirDirection to throw into.
File define.h
This file is really too large. With all the .h files around, this file should be better split between them - things that deal with objects should be in objects.h, things dealing with players in player.h, etc. As it is, everything just seems to be dumped in here.
Global dequeue_path_requests (void)
Only compute time if there is something more in the queue, something like if (path_request_queue_empty()) { break; }
File drink.c
Since drinks are basically just food objects with different messages, they should really be merged into one type, using sub-types to differentiate them. Merging in flesh object types at the same time might make sense as well.
File exit.c
Somehow allow multi-part objects to pass through exits. The issue is that usually portals lead to a space next to a return portal. This means that when the multi-part object enters a portal, chances are that either its head or its tail will be on top of the return portal, causing it to teleport back to the portal it wanted to enter in the first place...
Global expand_sight (object *op)
Improve the formula.
Global FLAG_SPLITTING
Remove?
Global get_rangevector (object *op1, object *op2, rv_vector *retval, int flags)
Document.
Global get_rangevector_from_mapcoords (mapstruct *map1, int x, int y, mapstruct *map2, int x2, int y2, rv_vector *retval, int flags)
Document.
Global level_exp (int level, double expmul)
Remove, since the param expmul seems to always be passed as '1.0'?
Global MONSTER_DATA_INTERFACE_DISTANCE
This should really be a define somewhere else; we need a constant here only because socket_command_talk() does not define one and simply uses SIZEOFFREE.
Global path_node_insert_priority (path_node_t *node, path_node_t **list)
Make more efficient by using skip list or heaps.
File random_map.c
Explain process, layout signs (# C D < >) and such.
Global relative_tile_position_rec (mapstruct *map1, mapstruct *map2, int *x, int *y, int *z, uint32_t id, int level, int flags)
A bidirectional breadth-first search would be more efficient.
Global resolve_client_socket_field (fields_struct *field, const fields_struct *field_orig)
This should really be removed; instead we should wrap the player's client socket as a Python object.
Global retrofit_joined_wall (mapstruct *the_map, int i, int j, int insert_flag, RMParms *RP)
Merge with pick_joined_wall()?
Global treasure_create_one (treasure_list_t *treasure_list, object *op, int difficulty, int flags, treasure_affinity_t *affinity, int artifact_chance, int tries, treasure_attrs_t *attrs)
Get rid of the goto.