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

Comparing deliantra/server/server/cfperl.xs (file contents):
Revision 1.362 by root, Thu Apr 8 19:31:22 2010 UTC vs.
Revision 1.367 by root, Mon Apr 12 05:22:38 2010 UTC

230 do_destroy (); 230 do_destroy ();
231 sever_self (); 231 sever_self ();
232} 232}
233 233
234void 234void
235attachable::do_delete ()
236{
237 delete this;
238}
239
240void
235attachable::check_mortals () 241attachable::check_mortals ()
236{ 242{
237 static int i = 0; 243 static int i = 0;
238 244
239 for (;;) 245 for (;;)
252 258
253 if (0) 259 if (0)
254 { 260 {
255 for (int j = 0; j < mortals.size (); ++j)//D 261 for (int j = 0; j < mortals.size (); ++j)//D
256 fprintf (stderr, "%d:%s %p ", j, &((object *)mortals[j])->name, mortals[j]);//D 262 fprintf (stderr, "%d:%s %p ", j, &((object *)mortals[j])->name, mortals[j]);//D
263
257 fprintf (stderr, "\n");//D 264 fprintf (stderr, "\n");//D
258 } 265 }
259 } 266 }
260 } 267 }
261 268
281 } 288 }
282 else 289 else
283 { 290 {
284 mortals.erase (i); 291 mortals.erase (i);
285 obj->sever_self (); 292 obj->sever_self ();
286 delete obj; 293 obj->do_delete ();
287 } 294 }
288 } 295 }
289} 296}
290 297
291void 298void
1224object::ref () const 1231object::ref () const
1225{ 1232{
1226 if (type == PLAYER) 1233 if (type == PLAYER)
1227 return format ("player/<1.%llx>/%s", (unsigned long long)uuid.seq, &name); 1234 return format ("player/<1.%llx>/%s", (unsigned long long)uuid.seq, &name);
1228 else 1235 else
1236 // TODO: should be able to save references within the same map, at least
1229 return 0; 1237 return 0;
1230} 1238}
1231 1239
1232object * 1240object *
1233object::deref (const_utf8_string ref) 1241object::deref (const_utf8_string ref)
1682 PROTOTYPE: @ 1690 PROTOTYPE: @
1683 CODE: 1691 CODE:
1684 while (items > 0) 1692 while (items > 0)
1685 sv_rvweaken (ST (--items)); 1693 sv_rvweaken (ST (--items));
1686 1694
1687void 1695void log_suspend ()
1696
1697void log_resume ()
1698
1688log_backtrace (utf8_string msg) 1699void log_backtrace (utf8_string msg)
1689 1700
1690void
1691LOG (int flags, utf8_string msg) 1701void LOG (int flags, utf8_string msg)
1692 PROTOTYPE: $$ 1702 PROTOTYPE: $$
1693 C_ARGS: flags, "%s", msg 1703 C_ARGS: flags, "%s", msg
1694 1704
1695octet_string path_combine (octet_string base, octet_string path) 1705octet_string path_combine (octet_string base, octet_string path)
1696 PROTOTYPE: $$ 1706 PROTOTYPE: $$
2156 PROTOTYPE: $$;$ 2166 PROTOTYPE: $$;$
2157 PPCODE: 2167 PPCODE:
2158{ 2168{
2159 rv_vector rv; 2169 rv_vector rv;
2160 2170
2161 PUTBACK;
2162 get_rangevector (ob, other, &rv, flags); 2171 get_rangevector (ob, other, &rv, flags);
2163 SPAGAIN;
2164 2172
2165 EXTEND (SP, 5); 2173 EXTEND (SP, 5);
2166 PUSHs (newSVuv (rv.distance)); 2174 PUSHs (sv_2mortal (newSVuv (rv.distance)));
2167 PUSHs (newSViv (rv.distance_x)); 2175 PUSHs (sv_2mortal (newSViv (rv.distance_x)));
2168 PUSHs (newSViv (rv.distance_y)); 2176 PUSHs (sv_2mortal (newSViv (rv.distance_y)));
2169 PUSHs (newSViv (rv.direction)); 2177 PUSHs (sv_2mortal (newSViv (rv.direction)));
2170 PUSHs (to_sv (rv.part)); 2178 PUSHs (sv_2mortal (to_sv (rv.part)));
2171} 2179}
2172 2180
2173bool on_same_map_as (object *ob, object *other) 2181bool on_same_map_as (object *ob, object *other)
2174 CODE: 2182 CODE:
2175 RETVAL = on_same_map (ob, other); 2183 RETVAL = on_same_map (ob, other);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines