--- crossfire/common ---


Protocol:pserver User:anonymous
Machine:crossfire.cvs.sourceforge.net CVSROOT:/cvsroot/crossfire

Filename: friend.c
Revision 1.9akirschbaum 2006/02/08 18:48:36 +2 -2
Apply patch #1427979 (code-cleanup: add const, fix warnings) by Stefan
Huehner.
Show difference between Revision 1.8 and 1.9
Revision 1.8akirschbaum 2005/12/05 17:34:03 +3 -3
Apply patch #1371956 (code cleanup patch) by Stefan Huehner: fix old-style
function declarations and prototypes to proper Ansi C syntax. This patch
allows the compiler to check function arguments and also removes some warnings
when compiling with -Wstrict-prototypes.
Show difference between Revision 1.7 and 1.8
Revision 1.7gros 2005/10/18 11:54:30 +15 -1
Upgrade of the Crossfire server to version 2.0 of the plugin interface.
Upgrade of the Python plugin to version 2.0 of the plugin interface.
Gros - 18/10/05
Show difference between Revision 1.6 and 1.7
Revision 1.6mwedel 2002/07/14 23:25:39 +3 -3
Update banner copyright with proper contact information.
MSW 2002-07-14
Show difference between Revision 1.5 and 1.6
Revision 1.5cvs 2001/01/15 16:33:32 +90 -29
MSW 2000/01/15:
Various fixes for friendly object code:
common/button.c: Add missing call to remove_friendly_object
common/friend.c: Pretty much completely re-written. add_friendly_object now
checks to make sure the object being added isn't already on the list,
remove_friendly_object will remove objects whose tags don't match,
and added clean_friendly_list.
common/object.c: No reason to use the function pointer to
remove_friendly_object since that function is in the lib.
common/time.c: Make DEBUG_TIME always on (no longer compile time option).
other areas use the global var pticks, so if it was turned off, compile
would break anyways.
common/treasuer.c: No longer print debug messages on artifacts created.
Cluttered log file making it hard to see more important errors.
include/config.h: Remove DEBUG_TIME define.
include/libproto.h: Rebuilt for clean_friendly_list function.
server/main.c: rewrote do_specials to do things based on pticks variable.
This allows various specials to be spread out across multiple ticks
easier. Also, added clean_friendly_function to part of what this does.
server/skills.c: add missing call to remove_friendly_object. Also, removed
from #if 0 .. #else .. #endif code.
End of MSW 2000/01/15 checkin.
Show difference between Revision 1.4 and 1.5
Revision 1.4cvs 2000/12/03 18:40:03 +2 -2
Checking for partial resistance code. Various minor errors also fixed
(compiler warnings, unused variables, Makefile.in changes, etc).
PR code also includes support to send protections to the client.
Show difference between Revision 1.3 and 1.4
Revision 1.3jec 2000/06/08 11:08:41 +2 -2
common/button.c: do_mood_floor(): Bugfixes: Only players can have pets.
Call add_friendly_object() for friendly monsters.

server/spell_effect.c and server/spell_util.c: Several functions: Only
add a pet if there really is a pet's owner, and it's a player.

server/spell_effect.c: cast_charm() and cast_charm_undead(): Bugfixes:
Only players can cast these spells. This fixes server crash if
a monster casted a charm spell, and the charmed pet was killed.
Call add_friendly_object for friendly monsters.

common/friend.c: remove_friendly_object(): Use llevError for error
messages.

common/living.c: fix_player(); server/gods.c: tailor_god_spell();
server/spell_effect.c: summon_avatar() and animate_weapon(): Bugfix: Set
a string to NULL after calling free_string(). This fixes a nasty bug
that caused the string's reference count drop below 0, which resulted
in corruption of malloc()'s internal data structures (and possibly
server crashes).

server/time.c: move_creator(): Bugfix: Call free_string() to free old
values of op->name and op->title before overwriting them with new values.

common/object.c: insert_ob_in_map_simple() and insert_ob_in_map():
Check that we don't insert freed objects.

server/attack.c: hit_player_attacktype() and hit_player(): Bugfix: Check
that find_god() really found a god, and that 'god->slaying' is not NULL.
Fixes crash if a monster casted turn undead and actually hit something.

server/attack.c: hit_player(): Check that a pet's owner is a player.
Prevents server crashes if a monster has a pet monster due to a bug
somewhere. Use llevError for error message.

server/time.c: move_arrow(): Use llevDebug level for "Arrow had no
map" message.

server/c_object.c, server/spell_effect.c, server/spell_util.c: Bugfixes:
Added some missing checks for destroyed objects. Use was_destroyed()
or return value of insert_ob_in_map() to check for destroyed objects,
not FLAG_FREED or FLAG_REMOVED. Don't use op->count of destroyed objects.

server/shop.c: get_payment2(): Type of tag is 'tag_t', not 'long'.

server/spell_effect.c: animate_bomb(): Fix environment checks.

server/spell_util.c: fire_bolt(): Bugfix: Set level of bolt.

server/spell_util.c: explosion(): Bugfix: Set FLAG_NO_APPLY before
moving the exploding object to the top.

server/spell_util.c: put_a_monster(): First create the monster
completely, then just insert its head.

server/time.c: generate_monster(): Bugfix: Don't free generators that
are used up in this function. process_object() already does this.
This fixes steambolt (which is a generator but must not used up here -
generate_monster() wasn't looking at FLAG_IS_USED_UP) and all generators
which should really be used up (because process_object() didn't expect
generate_monster() to destroy the object).
Show difference between Revision 1.2 and 1.3
Revision 1.2cvs 1999/07/13 01:02:41 +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.1uid200 1999/04/02 13:10:03 None
Initial revision
First version
Revision 1.1.1.1uid200 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


File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:06