ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/object.h
(Generate patch)

Comparing deliantra/server/include/object.h (file contents):
Revision 1.272 by root, Sun Jan 29 02:47:05 2017 UTC vs.
Revision 1.273 by root, Sat Nov 17 23:33:18 2018 UTC

1/* 1/*
2 * This file is part of Deliantra, the Roguelike Realtime MMORPG. 2 * This file is part of Deliantra, the Roguelike Realtime MMORPG.
3 * 3 *
4 * Copyright (©) 2018 Marc Alexander Lehmann / the Deliantra team
4 * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016 Marc Alexander Lehmann / Robin Redeker / the Deliantra team 5 * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
5 * Copyright (©) 2001 Mark Wedel & Crossfire Development Team 6 * Copyright (©) 2001 Mark Wedel & Crossfire Development Team
6 * Copyright (©) 1992 Frank Tore Johansen 7 * Copyright (©) 1992 Frank Tore Johansen
7 * 8 *
8 * Deliantra is free software: you can redistribute it and/or modify it under 9 * Deliantra is free software: you can redistribute it and/or modify it under
180 struct oblnk *link; 181 struct oblnk *link;
181 struct oblinkpt *next; 182 struct oblinkpt *next;
182 shstr id; /* Used as connected value in buttons/gates */ 183 shstr id; /* Used as connected value in buttons/gates */
183} oblinkpt; 184} oblinkpt;
184 185
186// temporary hack to find the culprit who corrupts face numbers. maybe. hopefully.
187struct faceidx_debug
188{
189 faceidx x;
190
191 operator faceidx () const
192 {
193 return x;
194 }
195
196 faceidx operator =(faceidx i)
197 {
198 if (ecb_expect_false (i >= faces.size ()))
199 {
200 fork_abort ("illegal faceidx assignment");
201 i = blank_face;
202 }
203
204 return x = i;
205 }
206};
207
208#if CFPERL
209static inline void sv_to (SV *sv, faceidx_debug &v) { v = SvIV (sv); }
210#endif
211
185INTERFACE_CLASS (object) 212INTERFACE_CLASS (object)
186// these are being copied 213// these are being copied
187struct object_copy : attachable 214struct object_copy : attachable
188{ 215{
189 sint16 ACC (RW, x), ACC (RW, y); /* Position in the map for this object */ 216 sint16 ACC (RW, x), ACC (RW, y); /* Position in the map for this object */
252 sint8 ACC (RW, glow_radius); /* indicates the glow radius of the object */ 279 sint8 ACC (RW, glow_radius); /* indicates the glow radius of the object */
253 uint8 ACC (RW, weapontype); /* type of weapon */ 280 uint8 ACC (RW, weapontype); /* type of weapon */
254 281
255 body_slot slot [NUM_BODY_LOCATIONS]; 282 body_slot slot [NUM_BODY_LOCATIONS];
256 283
257 faceidx ACC (RW, face); /* the graphical face */ 284 faceidx_debug ACC (RW, face); /* the graphical face */
258 285
259 faceidx ACC (RW, sound); /* the sound face */ 286 faceidx ACC (RW, sound); /* the sound face */
260 faceidx ACC (RW, sound_destroy); /* played on destroy */ 287 faceidx ACC (RW, sound_destroy); /* played on destroy */
261 288
262 sint32 ACC (RW, weight); /* Attributes of the object */ 289 sint32 ACC (RW, weight); /* Attributes of the object */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines