compare arches by name, not pointer value
rewrite objetc_create_clone to deep_clone and fix randfom map generator bug
fix minor clean-exit-destroy bug and also make peace spell invoke KILL
kv rewrite
do not use the copy constructor and assignment opertaor of object anymore
make full floorbox updates on insert/emove to preserve ordering
copy the map ptr when cloning an object
- get rid of the only use of object_copy as an instantiated type, saves gobs of code (~4kb) in change_abil, is probably way faster and removes some very ugly code. - this->remove in operator =, as x/y gets overwritten
*** empty log message ***
*** empty log message ***
*** empty log message ***
- optimise visible_to - visible_to now only sends floor items when they might be visible - optimised remove for the map case - remove now clsoes containers that get removed from the floor - work around possible client bug by forcign an item flag update for cointainers - avoid superfluous floorbox resets
catch a potential bug
*** empty log message ***
do less full floorbox updates, just send/delete item
unapply items does not update client; update copyright
reintroduce last_weight optimisation, clear TODO
see Changes
- automaticaly esrv_del items on remove
- fix weight/pickup bugs, visible_to - do more automatic nrof/weight updates - kill funcpoint.h
bug1
- fix weight update on insert-merge - refactor get_split_ob into ->split, taking advantage (partially only) of split managing client updates.
refactor decrease_ob* into ->decrease method.
weight system rewrite, also simplified and streamlined most related functions
minor refactoring
*** empty log message ***
*** empty log message ***
beeing too clever for ones own good is not good
*** empty log message ***
*** empty log message ***
just in case, set nodrop on the freed objects map. reorder some code in get_pet_enenmy
calling find_free_spot with 0 ob is apparently valid
update copyrights and other minor stuff to deliantra
add a tracer on the mysterious owner issue
*** empty log message ***
check the whole object in find_free_spot. the documentation obviously was bogus (but matching the code :). this might fix kamuros problem, although it is not understood what causes it in the first place, and its hard to reproduce
quickfix
- implement archetype->instance as replacement for arch_to_object (better name?) - fix arrows merging with stuff on floor - fix level_for_item to read more clearfly, do not use drand48 and fix the random level generation when !level set. - splay arrow container in find_arrow (but searching containers is still borked?) - improve create_missile spell.
implement merge checking by slow and careful recursion on the objects, slow, but hopefully very rare even in the future
slightly better can_merge
- clean up message system, combine all boxes into one. - suppress too long messages (we need a more robust solution to this problem). - get rid of INS_MAP_LOAD, leading to slightly cleaner/faster code and certainly one special case less. - insert objects manually at load time, this is both faster and also more correct, as loading a map is never supposed to trigger anything (and also for symmetry to the save code).
- quick work around for gate-move-bug. the real fix is probably to either give everything a movetype OR to treat movetype 0 as special (can move anywhere if there is at leats one movetype not blocked). the latter was too big a change for me to do it, thus just the workaround. - do not do locking on i/o anymore.
forgot to chekc for alive, this caused server overloads (no crashes, no deadlock, but pseudo-freezes)
- rewrite/cleanup ob_blocked a little. its more efficient now, probably has less bugs and more bugs. - get rid of now unused P_NO_PASS.
- clean up stuff - get rid of map_load lock - improve change_object
*** empty log message ***
*** empty log message ***
cleanup
- hopefully fix say w.r.t. NDI_REPLY - rework the disease code a bit. - set_owene rfater inserting whne throwing or diseasing. these are the only cases i know where the owner is set when inserting into another object. *cough*
- this seems to fix almost all known cases of players staying around for no good reason: player throws stuff, picks it up. this also leads to players not losing their missile weapons. - async vs. async_pool means we keep stdout...
only show env in debug_desc when not removed
fix a server crash when unpaid items get dropped on logout due to the socket being released first, but we require contr->ns to be valid at all times when a player is on a map
remove unused mapstruct.active
be mroe careful of our surroundings
fix clock sound, add chest open/close sounds
indent
- make alchemy create pyrite not gold nuggets - use three types of "nuggets" - simplified alchemy code. - update the floorbox in do_remove, this fixes some issues and should simplify other code as well. besides, insert does it too, and it is cheap.
10:47:00 <irwiss> schmorp; I seem to have found a bug... If you open a container, and then it disappears - burnt by a fire spell for example, you can't close it, nor can you see items on the ground until you relogin
- monster generators now look for a free sport first instead of creating a monster then destroying it because it didn't fit. - only generate sounds for destroyed head objects.
quick hack to make every monster die loudly
be more generic
tweaked sound a bit, added death sounds with another property (wastage?)
*** empty log message ***
very very preliminary, non-working sound framework
implement simplistic/slow/safe object merging for objects with perl data, start of a worldmap item
added handle_apply_yield to cfperl.xs and renamed cfperl::invoke_results => cf::invoke_results. also added the new slag ex(tm) extension
return 0 from name_to_material for unknown materials, to avoid unknown material message
- unbundle marker code into force_find/force_add - use completely different (more efficient) speed logic - make those methods available to perl - to avoid numerical errors use an exact fp number for MIN_ACTIVE_SPEED.
- upgrade crossfire trt to the GPL version 3 (hopefully correctly). - add a single file covered by the GNU Affero General Public License (which is not yet released, so I used the current draft, which is legally a bit wavy, but its likely better than nothing as it expresses direct intent by the authors, and we can upgrade as soon as it has been released). * this should ensure availability of source code for the server at least and hopefully also archetypes and maps even when modified versions are not being distributed, in accordance of section 13 of the agplv3.
add some debugging code, fix players not getting freed on logout
apply common sense
- improve observe - remove more cruft code - archetype loading almost works again, reloading probbaly still borked.
- archetype is now a subclass of object. - store archetypes in an object_vector. - use a different startegy for archetype loading (reloading is MOST CERTAINLY broken).
rename arch->name to arch->archname for preparation of subclassing object
update copyrights in common/*.C and util/*.C
more skill tuning: - clear_skill is gone, use change_skill (0) instead. - change_skill now clears the current_weapon. - more intelligent weapon switching on unapply. - be more clever when initially applying weapons on player load/connect. - survive wrong setting of READY_WEAPON.
- prepare common/ for head_ => head change - add some copyrights for files where they were missing
*** empty log message ***
*** empty log message ***
remove superfluous/broken settings and related code - COZY_SERVER: enabled most msall adjustments, changed digestion formula to the original one, party member treament w.r.t. pets enforced. - PROHIBIT_PLAYERKILL: default - real_wiz: removed and enforced - create_home_portals: removed and enforced - casting_time: removed and forced to be off (was crashing anyways) - was_wiz flag removed and treated as off usually unless it was used in place of flag_wiz. - do not save or restore wiz, wizcast and wizpass flags.
always switch to ranged weapon when using it (for now)
more fixes
*** empty log message ***
*** empty log message ***
almost works
closer, still hackish
- add two new slots for shields and combat weapons - make slots into bitfields, they are not too speed-critical and this saves 16 bytes in the object structure. - add accessors to body lcoation names etc. to perl - use those in the body command
beta it slowly into shape
big simplification, still doesn't work, but feels cleaner
This is the first rough cut of the skill use system (use the STABLE tag). Details will likely change, and combat skills do not work very well, but it works quite well. Players no longer have a shoottype or range slots, instead, each player has these members: combat_skill/combat_ob the currently selected skill (and weapon) for direct attacks. ranged_skill/ranged_ob the currently selected ranged skill (and bow/spell/item) golem the currently-controlled golem, if any.
goofign around a bit: the while ranged/non-ranged system is borked and needs some serious redesign
server crashed this morning because a freed golem tried to follow his owner, triggering the assertion failure. the golem had no owner, but the owner still had him in his range slots. I refactored a bit of the code and rearranged it to hopefully increase chances of this not occuring again.
slight revert, and more fixes
having a) monsters as treasures b) multipart monsters as treasures and c) multipart monsters as terasures on tiled maps... hit a big pile of bugs again. this change: - implements a per-map active flag. when items are being inserted they are activated or deactivated according to that flag. this could get rid of most or even all of the explicit activate/deactivate calls. - implement some glue to make instantiating multipart objects easier (this is used inside fix_multipart_objects and might make it possible to put multipart objects at map borders - those were winged before) - do finer-grained locking as to not lead to deadlocks when insert recurses e.g. when loading tiled maps.
VERY EXPERIMENTAL - change the way archetypes and treasurelists are being loaded: - referring to a nonexisting treasurelist will create an empty one - referring to a nonexisting archetype will create an empty one - archetypes/treasurelists will overwrite any existing object of the same name. - net effect should be to allow reloading of archetypes and treasurelists at runtime at a later stage.
- remove many TODO items that in fatc have been fixed already without looking at the TODO. - remove unpaid items on playerdeath unconditionally. - reenabled cede-while-saving.
- MAJOR CHANGE - you now need to use cfutil to install arches. - former bigfaces are broken in the server - bigfaces are no longer supported. at all. - use face numbers instead of pointers * saves lotsa space * saves lotsa indirections * saves lots(?) cpu cycles - completely rewrote face handling - faces can now be added at runtime - reload will add new faces - this does not apply to animations - use a hastable instead of binary search (faster) for faces - face caching is broken - facesets are gone - server always reports MAX_FACES to any client who asks
nano-cleanups
- identified random memory corrutpion bug - fixed most likely cause for bug above - rewrote object loader etc. into a simple one-line lookahead parser. - rewrote/cleaned up archetype, treasure, artifact, formula parser. - some optimisations / cleanups
- avoid floorbox updates when client has container open, this completely confused gcfclient, although completely valid by the protocol (and of course, cfplus didn't even notice it).
- add you readied xxx message. - actually send the inventory ion container open.
hell on earth, rewrote the container code - it really was a mess before - open/close events should now be very reliable. - make container an object_ptr, just to be on the safe side (the old code is known to crash, the new code should be reliable, but...). - its also smaller, much smaller/clearer in sourcecode size and a bit smaller in text segment size. also disable big worldmap again: is this still causing memleaks?
more materialcode changes in preparation for... oh my god this is material framework is broken
replace amny strcpy by checked assign's
fixed debug_info
- implement mood floor types 5 and 6
- implement per-space regions
- experimentall.y determine minimum random map size (12) - harden random map generator by stresstesting - reduced codesize while increasing readability (RANDOM => rndm) - fixed a likely unimportant bug in random_roll64 - possibly broke lots of code
- tame the map/map-world.ext a bit to avoid potential memleaks for now - object refcounting was borked, fixed, again :) - add cf::attacahble::mortals_size - disable reset-after-load, this is unsafe due to locking issues, so don't do it - make map-scheduler configurable - improve emergency swap mode - prepare_random_map must be a sync job for now :( - do not keep object reference in enter_exit, the object might have been gone already. - nuke cf::object::mortals.
- introduce nodrop flag for maps to keep stuff from beign dropped _on destroy only_. this fixes the problem with Sultur, slug of terror :) - resize {link} map to be smaller
- weirdify refcounting: objects still keep their natural refcount of zero do not borrow anymore, seems the right thing to do *right now*
mark watchers as reentrant, some FABS => fabs
base classes can be so tedious
just experimenting
- fix a horrendous bug that might have caused all the map corruption - optimise/modernise some map-insert-related stuff - fix debug_desc - remove crypt configury - minor adjustments/cleanups
comments
more micro-optimisation, use idistance, min is faster than MIN
minor stuff
- added $cf::WAIT_FOR_TICK* - tuned map-scheduler and player-scheduler - added $op->inv_recursive - added objects_size/objects($index) and actives_size/actives($index) for access to the object and actives vector. - more robust player loader - removed _perl_data attribute support - SIGINT/TERM/HUP are now safe as they are handled synchronously. - replaced LOOK_OBJ by client_visible - cleanups
quick and dirty emergency fix
more preperations for player eviction
use destroy_on_detah, not no_drop, for summoned stuff
implement quit
""
added some copyrights
- new untested set_flag_inv method to change a flag on all inv objects - do ot satop running when switching maps - fixed speed_left assymentry in handle_newcs_player - do not immediately handle running commands when calling handle_command, as it could have deactivated the object.
initialised :)
activate_recursive etc. was using op->above, not op->below, so was not recursive at all
minor annoyance fix
misc fixes
misc fixes
set original flag so decay object doesn't go wild
- style maps need very special treatment - cf has a nonzero chance of crashing in a random map
many minor changes everywhere, random maps crash sometimes but design is in place
fixed the problem where objects with speed=0 were on the active object list. extended debug_desc a bit. implemented object::has_active_speed ().
preliminary snapshot check-in, DO NOT USE IN PRODUCTION SYSTEMS See the Changes file for details
*** empty log message ***
work around crossfire design bug
- added maptile->insert and object->insert_at methods that might make code using it clearer. - replaced some insert_ob_in_map calls.
drop-to-ground on player logout fixed, possible warning from set_speed fixed
what meaning had the duplicated LOG()? looks bogus to me => removed.
temporarily(?) silence(?) the 'destroyed leaving object' warning
more cleanups and bugfixes, we are reaching a local peak of stability now
clean up the mess that is inventory-drop-to-ground-semantics-or-maybe-not? this needs to be cleaned up elsewhere in cf, such as in kill_object.
replace update_ob_speed by ->set_speed
simplify logic in apply_builder_remove, let update_ob_speed work if the objetc is in delayed destruction
- some fixes - disable some refcounting again, not ready yet - simplify save_object
the big rename
interim.checkin
- small, but subtle, rewrite of object management - perl will now keep attachable objects alive - objects are now refcounted - refcouts need to be tested explicitly (refcnt_chk) - explicit destroy is required current - explicit destroy asks "nicely" for the object to self destruct, if possible - refcounts will be used during mortal killing - minor bugfixes, optimisations etc. - some former hacks removed.
an experiment
- rename flags => flag (because its rpedominantly used singular), - remove remaining use of the flags array semantics
remove object_pod/object_keep hacks
- preliminary check in, stuff is rudimentarily working - moved most of the player creation process into a perl coroutine - changed internal design of player management to not reuse and morph the object in funny ways. should be safer and much nicer to handle. - got rid of some annoying hacks, such as clear() (TODO: get rid of player_pod and other stuff now unnecessary?)
- made state a per-client variable (that does not magically make state a per-client thing!) - rename player->socket to player->ns. its not a good name for "client", but it is an historical artifact, and better than "socket".
- reduce map memory consumption by reserving space for only the 3 existing layers - factorise out some functions into mapspace and object
- mapspace caches are now reevaluated only on-demand only - "heavily" optimised get_map_flags - it might be MUCH faster now - some cleanups - some deoptimisaton in update_object - enabling it makes some bigfaces disappear when they are not fully visible. why?
- minor cleanups - minor optimisations (in_player vs. is_player_inv) - added P_PLAYER map flag - some (dead) concept code
some source simplification
reverted the last change to move_apply and check_inv and fixed check_inv differntly: as all the buttons and pedestals check themselves whether the objects above them satisfy their conditions i thought the best would be if check_inv would do the same. The new semantics are compatible with the semantics used by the map makers (at least i hope that) and won't end up in a broken state so easily now. While fixing check_inv i documented inventory checkers in objects.pod
Added a parameter to move_apply that indicates whether something moved on or off and changed check_inv to take the same additional argument. An inventory checker is now mostly state-independend and a bad state is corrected now if the inventory checker is activated. While fixing that i've documented the HOLE type and FLAG_ACTIVATE_ON_(PUSH|RELEASE) in objects.pod.
- hide floorbox implementation details - use meaning (hopefully) names
ooification
- remove recycle_tmp_maps setting (hardwired to true) - replace object->flags by std::bitset, seems to be way more efficient, for some unexplainable and not looked-into reason. its way cleaner, too...
- rewrote most of the socket loop code - moved connection accept into tcp.ext - no evil socket copying anymore, needs more cleanups
further cleanups and oofication
added a needed abstraction
- more ooficiation - removed now superfluous remove calls
replace some function- by method-calls
reduced dependencies on old plug-in api, fixed some bugs and renamed some methods while I was at it.
- simplify headerfiles (this is the 21st century) - remove long long hacks for printf etc.
lld -> I64_PFd
- implement and modernize op->insert and op->remove - simplify find_hth_skill to always use first found - change change_skill to move recently used skills to top of inventory
- changed uint64 to sint64 for levels - removed obsolete debugging code
do it at the right time, honey
move objects onto a special freed objects map (2)
move freed objects to dummy map so their map * stays valid
* remove arch.h * use refcounting for archetypes * cleanup * strat of generic garbage collector
re-implement dump and dumpbelow
* nuke op->contr when players log out, to avoid dereferencing them later :( * also rename free to destroy * do not create weird messages when people examine pseudo inventory objects
*** empty log message ***
*** empty log message ***
mapstruct => maptile removed many ytypedefs in favor of structure tags
replace was_destroyed by much simpler and less expensive ->destroyed, which is valid, as objetc pointers are now reliable.
indent
cleanup
presuppose iso c++0x
*** empty log message ***
removed now obsolete generation counter checks - further slimmed down sizeof(objetc) to 616 bytes
removed freed hack. extra refcounting increased code size by 3k in an unoptimised build
aggressively use refcounted pointers for object references - seems to fix all random stomping. also reduced size of object further from originally 656 to 624 bytes
reenable shstr gc, fix bug bad bug in allocator
preliminary uuid support
fix object list linking (severe bug)
make use of slice_allocator and inline zero_initialised
- improve assign to prepend "..." - make more use of assign - implement op->debug_desc() and make some more use of it
- introduce shstr_cmp for mass comparisons to shstr and make use of it - introduce assign utility function to replace strncpy
convert to more stable depth-firts iterator
introducing skillinc.h
fixed crash on quit
- temporarily disabled shstr garbage collection - use sint64 instead of uint64 in shop code - implement fully recursive item iterator for object - add some utility functions
implement owner pointer using refcounted refptr templates
make rmeove_ob and free_ob idempotent, to the extent possible with the current design
*** empty log message ***
indent
indent
fix perl class for archetype, never free once-allocated objects, or destruct them, there are too many long-lived references (and refcount doesn't help, likely because it isn't correctly being incremented/decremented).
indent
remaining bugfixes
likely fix another crash bug
fix a few ugly pod-constructs on non-pod objects, and a few newly introduced bugs
*** empty log message ***
genaccess, take two
generic accessors, take one
reality always is less simple than it appears
major map loading speedups
fix, uhm, bug. da.
Changes... - alternative shstr representation, saves code - use glibs splice memory allocator (seems slower) - use simpler memory/lifetime management for objects, no recycling
string scanning (e.g. for patch) is not implemented ATM but should be easy to add with an alternative constructor for object_thawer. Rewrote flex scanner to be simpler, faster and more modularised. Initial speedup: 16% (ah well)
removed ox/oy, and then added shstr stuff to the recipes in alchemy
THIS CODE WILL NOT COMPILE use the STABLE tag instead. - major changes in object lifetime and memory management - replaced manual refcounting by shstr class - removed quest system - many optimisations - major changes
rewrote object serialiser, parser is next
improve thawer interface, implement some monster event support
expand initial tabs to spaces
- added ready/unready/can_apply events and their passive versions - removed support for event_*-fields in maps - removed support for current_weapon_script - removed timers - removed say/shout/Tell and related commands
improved,more automatic freezer
first, untested persistent objetc storage for players and objects, not yte for maps
intermediate check-in, per-object events work
many, many cleanups
converted more events, broken per-object events (needs map support), lots of fixes
Made server compile with C++. Removed cfanim plugin and crossedit. C++ here we come.
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.