Protocol: | pserver | User: | anonymous |
Machine: | crossfire.cvs.sourceforge.net | CVSROOT: | /cvsroot/crossfire |
Filename: treasure.c | |||
Revision 1.28 | ryo_saeba | 2006/06/03 16:56:28 | +10 -3 |
Implement feature request #815622 | |||
Show difference between Revision 1.27 and 1.28 | |||
Revision 1.27 | tchize | 2006/04/06 16:18:35 | +5 -5 |
finished common/arch.c unit test, fixed a few bugs, moved function around and renamed other | |||
Show difference between Revision 1.26 and 1.27 | |||
Revision 1.26 | ryo_saeba | 2006/03/18 11:15:25 | +4 -3 |
Use const when possible. Patch courtesy Stefan Huehner. | |||
Show difference between Revision 1.25 and 1.26 | |||
Revision 1.25 | akirschbaum | 2006/03/04 11:37:19 | +7 -6 |
Apply modified parts of patch #1439490 (Fix in random map generation) by CF Development Team Schmorp.de <crossfire@schmorp.de>. | |||
Show difference between Revision 1.24 and 1.25 | |||
Revision 1.24 | qal21 | 2006/01/08 17:12:26 | +13 -13 |
Change 'if(0)' to an '#if 0' | |||
Show difference between Revision 1.23 and 1.24 | |||
Revision 1.23 | mwedel | 2005/11/16 02:16:08 | +15 -17 |
Commit for new blocking code. Not going to dictate all the changes - but will outline the broad points. Note also that the doc/Developers/objects is updated and goes into more details also. - check for P_WALL no longer used - instead, need to use GET_MAP_MOVE_BLCOK and check against movement type of objects. - arch_blocked() changed to ob_blocked(), now takes object. Needed because just looking at archetype move_ values is no longer sufficient. - find_first_free_spot() changed to take object, since it just calls arch_blocked() - FLAG_FLYING removed, now in move type. - walk_on/walk_off/fly_on/fly_off removed - now based on move_on and move_off fields. - Map space structure extended to hold the move_on/move_off, etc values so that we can shortcut some processing by not having to check every object on the space when something enters it if move_on isn't set. - archetypes recollected - boulders needed move_walk to properly trigger buttons. - Note that the new plugin code has to be fixed up for the new movement code. Look for FIXME in plugins/cfpython/cfpython_object.c MSW 2005-11-15 | |||
Show difference between Revision 1.22 and 1.23 | |||
Revision 1.22 | akirschbaum | 2005/11/01 14:52:04 | +3 -1 |
random_maps/treasure.c: Fix out-of-bounds array access if place_chest() cannot find a free spot to place a new chest. | |||
Show difference between Revision 1.21 and 1.22 | |||
Revision 1.21 | akirschbaum | 2005/09/04 11:58:12 | +2 -2 |
common/{anim.c, image.c, los.c, map.c, porting.c, treasure.c}, include/define.h, random_maps/treasure.c, server/{apply.c, c_misc.c, c_object.c, c_wiz.c, commands.c, daemon.c, hiscore.c, init.c, login.c, player.c, plugins.c, resurrection.c, weather.c}, socket/{init.c, item.c, loop.c, lowlevel.c}: Use LOG() for error messages and debug output instead of stdout/stderr. Include filename in error messages. server/resurrection.c: Fix error message in read_player(). | |||
Show difference between Revision 1.20 and 1.21 | |||
Revision 1.20 | mwedel | 2004/04/14 02:24:31 | +14 -5 |
common/object.c: Change CAN_MERGE() so that it compares the stats structure of the objects being merged. Fixes problems of rings improperly merging with other rings that have different stat values. server/monster.c: Modify check_earthwalls() and check_doors() to take a map structure as an option parameter, and use that structure when calling get_map_ob. Fixes a crash in cases where earthwalls/doors were at the edge of a tiled map, and creature was on other map moving into it. server/move.c: Change move_ob() to adjust coordinates for tiling, and pass in these adjusted coordinages (and map) to the check_() functions in monster.c random_maps/treasure.c: Apply patch by Andreas Kirschbaum so that it does more work in trying to place keys on maps. MSW 2004-04-13 | |||
Show difference between Revision 1.19 and 1.20 | |||
Revision 1.19 | mwedel | 2003/01/08 02:39:18 | +5 -3 |
Bulk of this commit is to improve code for tiled maps - replace wall/blocks_magic/blocks_cleric, etc with get_map_flags which also does map tiling translation as needed. This should fix a lot of the bugs related to map tiling (there are sure to be more out there - all the get_map_ob still need to be checked). Other changes - many spells stopped progressing on spaces that blocked view - that is now removed - didn't make a lot of sense. Other fixes - some cleric spells (eg, word of recall) checked to see if magic was prohibited, didn't check to see if cleric was prohibited. Clean up some bugs in the lighting code that would cause erroneous results. Also, allow players to see immediately around them on outdoor maps no matter how dark the map really is - behaviour on indoor maps is the same. Lots of code reformatted, and lots of obsoleted/dead code removed. Add max range to dimension door. Fix magic map - got broken when the layer stuff was redone - was not showing proper colors. IT also works sensibly on tiled maps now - rather than display based on the map, it gives the player a 50x50 area centered on where the player is. Change fire_bow - move special player fire modes into own function - makes code much cleaner. Hopefully this fixes more bugs than it introduces. common/los.c, common/map.c, common/object.c, crossedit/Edit.c, include/libproto.h, include/sockproto.h, include/map.h, include/spellist.h, include/sproto.h, random_maps/treasure.c, random_maps/wall.c, server/attack.c, server/c_misc.c, server/c_wiz.c, server/disease.c, server/main.c, server/monster.c, server/pets.c, server/player.c, server/rune.c, server/shop.c, server/skill_util.c, server/skills.c, server/spell_effect.c, server/spell_util.c, server/time.c, socket/info.c: See note above server/apply.c: Limit number of times weapon can be enchanted so that it won't overflow item_power. Modify enchant armor to enchant as normal armor is enchanted, also only allows one item to be enchanted. MSW 2002-01-07 | |||
Show difference between Revision 1.18 and 1.19 | |||
Revision 1.18 | mwedel | 2001/10/07 01:45:40 | +5 -5 |
common/map.c: Add INS_ON_TOP flag to insert_ob_in_map calls to preserve stacking order. Modify update_position to generate map spaces with more proper order. common/object.c: Modify insert_ob_in_map so that it preserves stacking if INS_ON_TOP is set. crossedit/CrEdit.c: Add missing code that would draw third face on a space. include/object.h: Add INS_ON_TOP flag/define. random_maps/exit.c: Modify code so that if the random maps leading to a special map are reset, they will properly link in with an already loaded final map (and update exit from final map back up) as needed. Also fix bug in that if the final map has been reset, a new one will now be properly loaded. random_maps/random_map.c:Update minimum size to be 7 (up from 6) - fixes bug which caused crashes when square_spiral maps of 6x6 would fail to generate. random_maps/random_map.h,random_maps/room_gen_onion.c: move OPT_values from room_gen_onion to random_map.h since the square_spiral code uses them. random_maps/square_spiral.c: Update call to map_gen_onion to use OPT_.. values instead of constant integer. random_maps/treasure.c: Add some casts to sprintf statements to eliminate some compiler warnings. server/main.c: Modify enter_exit code such that a random map has reset, we generate a new random map. This can happen when the random_map resets before the map that leads to them resets. MSW 2001-10-06 | |||
Show difference between Revision 1.17 and 1.18 | |||
Revision 1.17 | mwedel | 2001/07/13 23:08:06 | +10 -11 |
Map tiling checkin. random_maps/decor.c,random_maps/door.c, random_maps/exit.c, random_maps/floor.c,random_maps/monster.c,random_maps/special.c, random_maps/standalone.c, random_maps/style.c,random_maps/treasure.c, random_maps/wall.c: modified to use modified insert_ob_in_map function, use new macros to access map structure related data MSW 2001-07-13 | |||
Show difference between Revision 1.16 and 1.17 | |||
Revision 1.16 | mardahl | 2001/05/31 17:46:37 | +5 -3 |
Fix a problem in which hidden doors around treasures could destroy exits. PeterM 5/31/2001 | |||
Show difference between Revision 1.15 and 1.16 | |||
Revision 1.15 | mardahl | 2001/05/15 04:38:18 | +5 -4 |
Fix: make sure "surrounded" treasure chests are actually surrounded. An exit could break this surrounding. Now an exit can be underneath a locked door at times. We'll see how this works out. --PeterM 5/15/2001 | |||
Show difference between Revision 1.14 and 1.15 | |||
Revision 1.14 | mardahl | 2001/04/23 04:03:28 | +18 -9 |
Improved keyplacement routine: fixes the known failure case. PeterM | |||
Show difference between Revision 1.13 and 1.14 | |||
Revision 1.13 | mardahl | 2001/04/23 03:01:19 | +100 -90 |
Several changes: 1) Chests will no longer need keys to open under any circumstances. a) A side effect of this is that people won't be able to avoid traps in containers anymore. 2) Chests won't be placed under walls. 3) Nothing will be placed on exits anymore. | |||
Show difference between Revision 1.12 and 1.13 | |||
Revision 1.12 | mardahl | 2001/04/10 13:23:15 | +2 -1 |
Couple of small fixes which *may* prevent crashing. Things should not have crashed, but here we go anyway. | |||
Show difference between Revision 1.11 and 1.12 | |||
Revision 1.11 | mardahl | 2001/04/08 18:32:19 | +2 -2 |
Fixed a wrong loop limit: caused a crash. | |||
Show difference between Revision 1.10 and 1.11 | |||
Revision 1.10 | mwedel | 2001/02/23 00:06:35 | +2 -2 |
MSW 2001/02/22: TODO: Add some items, remove some others, remove outline of future versions, since it was out of date. common/loader.l,loader.c: Declare msgbuf a static outside the lex_load function. lex_load was otherwise clearing it each time it was called, which resulted in empty messages for the random artifacts (since the call lex_load one line at a time). Instead, we just zero this at start of load_object. Original reason of this change was due to purify errors - as I look at the code, it appears even before these changes that it was clearing the buffer properly. common/map.c: removing pending field from map objects. common/re-cmp.c: Comment out some code which was resulting in too many false compares. include/config.h: increase default for MAX_OBJECTS. 6000 is a bit small on current systems. include/map.h: Remove pending field from map structure. random_maps/treasure.c: Increase size of doorlist. Fixes crash, in that if a random map could place 8 doors around the treasure, the list was not terminated, so the problem would eventually try to read/dereference random memory after the array. server/c_misc.c: Remove pending field from maps, so remove functions and other places that referred to it (like the maps command) server/c_wiz.c: fix up wiz map reset command. Not really tested, but old code had some definate problems just from visual inspection. server/main.c: Further fix for unique exits - relative paths to unique maps from non unique maps should now work. server/monster.c: Various fixes - one is that should get more reliable distance values for multipart monsters. Second, modify dist_att to calculate from closest part of monster, and not the head of the monster. server/pets.c: Remove code dealing with pending objects. server/player.c: Don't remove invisible objects in players inventory when playing with permadeath mode. server/spell_util.c: If you try to cast denied spell, it no longer costs any spellpoints. socket/item.c: Fix bug where it was using 'item' protocol command instead of 'item1' End of MSW 2001/02/22 checkin. | |||
Show difference between Revision 1.9 and 1.10 | |||
Revision 1.9 | peterm | 2001/02/11 02:17:06 | +4 -2 |
Added a square spiral type of layout. | |||
Show difference between Revision 1.8 and 1.9 | |||
Revision 1.8 | peterm | 2000/12/14 21:09:19 | +81 -80 |
PeterM: Fixed up random map code. Used a lot of global variables for stuff. Always meant to fix it and just got 'round to it. | |||
Show difference between Revision 1.7 and 1.8 | |||
Revision 1.7 | peterm | 2000/07/26 13:24:38 | +10 -8 |
Crashing bug fixed. This crash should actually not have come up; it was a result of an illegal wall style. Long ago I had fixed the archetypes to prevent this problem, but it got, uh, "unfixed." --PeterM | |||
Show difference between Revision 1.6 and 1.7 | |||
Revision 1.6 | peterm | 2000/06/20 23:54:57 | +2 -1 |
Fixed a problem in treasure.c which would cause an infinite loop. Added two new special-exit types to special.c --PeterM | |||
Show difference between Revision 1.5 and 1.6 | |||
Revision 1.5 | peterm | 2000/06/20 02:33:38 | +2 -2 |
random_maps/treasure.c server/apply.c: made containers able to have more than one treasure in them, made a fix to treasure.c, which would change the options given to it in an unintended way. --PeterM 6/20/2000 | |||
Show difference between Revision 1.4 and 1.5 | |||
Revision 1.4 | cvs | 2000/06/18 20:34:31 | +7 -5 |
Lots of work done on random maps. decor.c: tiling option added. (Fill the whole map). monster.c: copy inventory exit.c: preserved connectedness random_map.c: new function for wrting map params floor.c: fix a crashing bug if there's no floor rproto.h: prototypes treasure.c: fix a crashing bug with treasurestyle map special.c: added a new type of special, an exit to a goldroom. --PeterM | |||
Show difference between Revision 1.3 and 1.4 | |||
Revision 1.3 | jec | 2000/05/26 04:50:47 | +5 -5 |
* apply() cleanup patch 26/5/2000 | |||
Show difference between Revision 1.2 and 1.3 | |||
Revision 1.2 | cvs | 1999/07/13 01:03:03 | +0 -0 |
Global commit for 0.95.4 - most files have no changes but just have differing headers between my local RCS and the CVS versions and need to get synced up. | |||
Show difference between Revision 1.1 and 1.2 | |||
Revision 1.1 | uid200 | 1999/04/02 13:10:03 | None |
Initial revision | |||
First version | |||
Revision 1.1.1.1 | uid200 | 1999/04/02 13:10:03 | +0 -0 |
First CVS revsion: crossfire-0.95.3 | |||
Show difference between Revision 1.1 and 1.1.1.1 |