ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/attack.C
(Generate patch)

Comparing deliantra/server/server/attack.C (file contents):
Revision 1.56 by root, Tue Apr 24 12:32:15 2007 UTC vs.
Revision 1.57 by root, Fri Apr 27 17:16:13 2007 UTC

1009 } 1009 }
1010 1010
1011 return op; 1011 return op;
1012} 1012}
1013 1013
1014
1015void 1014void
1016tear_down_wall (object *op) 1015tear_down_wall (object *op)
1017{ 1016{
1018 int perc = 0; 1017 int perc = 0;
1019 1018
1901 1900
1902#ifdef ATTACK_DEBUG 1901#ifdef ATTACK_DEBUG
1903 LOG (llevDebug, "Attacktype %d did %d damage\n", type, maxdam); 1902 LOG (llevDebug, "Attacktype %d did %d damage\n", type, maxdam);
1904#endif 1903#endif
1905 1904
1905 // for now, only do this for active objects, otherwise they
1906 // keep a refcount for a long time and I see no usefulness
1907 // for an non-active objetc to know its enemy.
1908 if (op->active)
1906 if (hitter->owner) 1909 if (hitter->owner)
1907 op->enemy = hitter->owner; 1910 op->enemy = hitter->owner;
1908 else if (QUERY_FLAG (hitter, FLAG_ALIVE)) 1911 else if (QUERY_FLAG (hitter, FLAG_ALIVE))
1909 op->enemy = hitter; 1912 op->enemy = hitter;
1910 1913
1911 if (QUERY_FLAG (op, FLAG_UNAGGRESSIVE) && op->type != PLAYER) 1914 if (QUERY_FLAG (op, FLAG_UNAGGRESSIVE) && op->type != PLAYER)
1912 { 1915 {
1913 /* The unaggressives look after themselves 8) */ 1916 /* The unaggressives look after themselves 8) */
1914 CLEAR_FLAG (op, FLAG_UNAGGRESSIVE); 1917 CLEAR_FLAG (op, FLAG_UNAGGRESSIVE);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines