1 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
2 /* hack.worn.c - version 1.0.2 */
31 for(wp = worn; wp->w_mask; wp++) if(wp->w_mask & mask) {
33 if(oobj && !(oobj->owornmask & wp->w_mask))
34 impossible("Setworn: mask = %ld.", wp->w_mask);
35 if(oobj) oobj->owornmask &= ~wp->w_mask;
36 if(obj && oobj && wp->w_mask == W_ARM){
38 impossible("Setworn: uarm2 set?");
40 setworn(uarm, W_ARM2);
43 if(obj) obj->owornmask |= wp->w_mask;
48 uarm->owornmask ^= (W_ARM | W_ARM2);
52 /* called e.g. when obj is destroyed */
53 setnotworn(obj) struct obj *obj; {
56 for(wp = worn; wp->w_mask; wp++)
57 if(obj == *(wp->w_obj)) {
59 obj->owornmask &= ~wp->w_mask;
64 uarm->owornmask ^= (W_ARM | W_ARM2);