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

Comparing deliantra/server/server/egoitem.C (file contents):
Revision 1.3 by root, Thu Sep 14 22:34:04 2006 UTC vs.
Revision 1.4 by root, Tue Dec 26 08:54:59 2006 UTC

1#include <global.h> 1#include <global.h>
2#ifndef __CEXTRACT__
3# include <sproto.h> 2#include <sproto.h>
4#endif
5 3
6/* GROS: I put this here, because no other file seemed quite good. Returns 1 if 4/* GROS: I put this here, because no other file seemed quite good. Returns 1 if
7 * the artifact could be created. 5 * the artifact could be created.
8 */ 6 */
9int 7int
31 free (temptitle); 29 free (temptitle);
32 }; 30 };
33 return 0; 31 return 0;
34} 32}
35 33
36
37/* peterm: do_power_crystal 34/* peterm: do_power_crystal
38 35
39 object *op, object *crystal 36 object *op, object *crystal
40 37
41 This function handles the application of power crystals. 38 This function handles the application of power crystals.
60 if (available_power < 0 && crystal->stats.sp > 0) 57 if (available_power < 0 && crystal->stats.sp > 0)
61 power_grab = -MIN (-available_power, crystal->stats.sp); 58 power_grab = -MIN (-available_power, crystal->stats.sp);
62 59
63 op->stats.sp -= power_grab; 60 op->stats.sp -= power_grab;
64 crystal->stats.sp += power_grab; 61 crystal->stats.sp += power_grab;
65 crystal->speed = (float) crystal->stats.sp / (float) crystal->stats.maxsp; 62 crystal->set_speed ((float) crystal->stats.sp / (float) crystal->stats.maxsp);
66 update_ob_speed (crystal);
67 if (op->type == PLAYER) 63 if (op->type == PLAYER)
68 esrv_update_item (UPD_ANIMSPEED, op, crystal); 64 esrv_update_item (UPD_ANIMSPEED, op, crystal);
69 65
70 return 1; 66 return 1;
71} 67}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines