From 783b00bbad140b2c5dcd51b64a0080c382ac8b0f Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 20 Feb 2006 05:35:58 +0000 Subject: [PATCH] (ichrstr): Rename member i_vtype to i_uid. (ichr_ca): Rename selector vtype to uid. --- include/item.h | 2 +- src/lib/commands/bomb.c | 4 ++-- src/lib/commands/buy.c | 6 +++--- src/lib/commands/coll.c | 4 ++-- src/lib/commands/deli.c | 6 +++--- src/lib/commands/drop.c | 4 ++-- src/lib/commands/expl.c | 2 +- src/lib/commands/fly.c | 2 +- src/lib/commands/give.c | 4 ++-- src/lib/commands/load.c | 4 ++-- src/lib/commands/lten.c | 14 +++++++------- src/lib/commands/mark.c | 2 +- src/lib/commands/move.c | 4 ++-- src/lib/commands/orde.c | 4 ++-- src/lib/commands/rout.c | 2 +- src/lib/commands/sell.c | 6 +++--- src/lib/commands/shoo.c | 4 ++-- src/lib/commands/tend.c | 14 +++++++------- src/lib/commands/thre.c | 2 +- src/lib/global/nsc.c | 2 +- src/lib/subs/mission.c | 4 ++-- src/lib/subs/plnsub.c | 16 ++++++++-------- src/lib/subs/trdsub.c | 4 ++-- src/lib/update/deliver.c | 2 +- 24 files changed, 59 insertions(+), 59 deletions(-) diff --git a/include/item.h b/include/item.h index 65f228091..fb40724bb 100644 --- a/include/item.h +++ b/include/item.h @@ -69,7 +69,7 @@ typedef enum { struct ichrstr { char i_mnem; /* usually the initial letter */ - i_type i_vtype; /* var type */ + i_type i_uid; /* index in ichr[] */ int i_value; /* mortgage value */ int i_sell; /* can this be sold? */ int i_lbs; /* how hard to move */ diff --git a/src/lib/commands/bomb.c b/src/lib/commands/bomb.c index ba4568607..92799b951 100644 --- a/src/lib/commands/bomb.c +++ b/src/lib/commands/bomb.c @@ -449,8 +449,8 @@ comm_bomb(struct emp_qelem *list, struct sctstr *target) return; getsect(target->sct_x, target->sct_y, §); target = § - before = amt = target->sct_item[ip->i_vtype]; - target->sct_item[ip->i_vtype] = amt = commdamage(amt, dam, ip->i_vtype); + before = amt = target->sct_item[ip->i_uid]; + target->sct_item[ip->i_uid] = amt = commdamage(amt, dam, ip->i_uid); if (before > 0.0) b = 100.0 * (1.0 - ((float)amt / (float)before)); else diff --git a/src/lib/commands/buy.c b/src/lib/commands/buy.c index 219bdcc35..bc33836cc 100644 --- a/src/lib/commands/buy.c +++ b/src/lib/commands/buy.c @@ -85,7 +85,7 @@ buy(void) ip = whatitem(player->argp[1], "Commodity you want to buy: "); if (!ip) return RET_SYN; - display_mark(ip->i_vtype, 0); + display_mark(ip->i_uid, 0); pr("\n"); p = getstarg(player->argp[2], "Which lot are you bidding on: ", buf); if (p == 0) @@ -99,7 +99,7 @@ buy(void) pr("Invalid lot number.\n"); return RET_OK; } - if (comm.com_type != ip->i_vtype) { + if (comm.com_type != ip->i_uid) { pr("That lot is not of the type you specified.\n"); return RET_OK; } @@ -158,7 +158,7 @@ buy(void) pr("That sector is under construction.\n"); return RET_FAIL; } - n = sect.sct_item[ip->i_vtype]; + n = sect.sct_item[ip->i_uid]; qty = comm.com_amount; if (qty + n > ITEM_MAX) { pr("That sector cannot hold %d more %s. It currently holds %d.\n", diff --git a/src/lib/commands/coll.c b/src/lib/commands/coll.c index 57d22f466..854eb7d78 100644 --- a/src/lib/commands/coll.c +++ b/src/lib/commands/coll.c @@ -101,9 +101,9 @@ coll(void) } pay = dchr[sect.sct_type].d_value * ((float)sect.sct_effic + 100.0); for (i = 0; ichr[i].i_name; i++) { - if (ichr[i].i_value == 0 || ichr[i].i_vtype == I_NONE) + if (ichr[i].i_value == 0 || ichr[i].i_uid == I_NONE) continue; - val = sect.sct_item[ichr[i].i_vtype]; + val = sect.sct_item[ichr[i].i_uid]; pay += val * ichr[i].i_value; } pr("That sector (and its contents) is valued at $%.2f\n", pay); diff --git a/src/lib/commands/deli.c b/src/lib/commands/deli.c index 0426c530d..fd1f86045 100644 --- a/src/lib/commands/deli.c +++ b/src/lib/commands/deli.c @@ -60,7 +60,7 @@ deli(void) if ((ich = whatitem(player->argp[1], "deliver what? ")) == 0) return RET_SYN; /* - if (ich->i_vtype == I_CIVIL || ich->i_vtype == I_MILIT) { + if (ich->i_uid == I_CIVIL || ich->i_uid == I_MILIT) { pr("You cannot deliver people!\n"); return RET_FAIL; } @@ -72,7 +72,7 @@ deli(void) if (!player->owner) continue; - del = sect.sct_del[ich->i_vtype]; + del = sect.sct_del[ich->i_uid]; thresh = del & ~0x7; dir = del & 0x7; @@ -107,7 +107,7 @@ deli(void) thresh = MIN(thresh, ITEM_MAX) & ~7; del = thresh | dir; - sect.sct_del[ich->i_vtype] = del; + sect.sct_del[ich->i_uid] = del; putsect(§); } diff --git a/src/lib/commands/drop.c b/src/lib/commands/drop.c index de48984e8..924a11ae7 100644 --- a/src/lib/commands/drop.c +++ b/src/lib/commands/drop.c @@ -87,13 +87,13 @@ drop(void) if (target.sct_own == player->cnum || getrel(getnatp(target.sct_own), player->cnum) == ALLIED) { - if (ip->i_vtype == I_CIVIL && target.sct_own != target.sct_oldown) { + if (ip->i_uid == I_CIVIL && target.sct_own != target.sct_oldown) { pr("Can't drop civilians into occupied sectors.\n"); return RET_FAIL; } } else { /* into the unknown... */ - if (ip->i_vtype != I_SHELL) { + if (ip->i_uid != I_SHELL) { pr("You don't own %s!\n", xyas(tx, ty, player->cnum)); return RET_FAIL; } diff --git a/src/lib/commands/expl.c b/src/lib/commands/expl.c index b2a42cbb0..cae8cc79b 100644 --- a/src/lib/commands/expl.c +++ b/src/lib/commands/expl.c @@ -75,7 +75,7 @@ explore(void) if (!(ip = whatitem(player->argp[1], "explore with what? (civ/mil) "))) return RET_SYN; - vtype = ip->i_vtype; + vtype = ip->i_uid; if ((vtype != I_CIVIL) && (vtype != I_MILIT)) { pr("You can only explore with civs and mil.\n"); return RET_FAIL; diff --git a/src/lib/commands/fly.c b/src/lib/commands/fly.c index a59323c7a..a7e0db401 100644 --- a/src/lib/commands/fly.c +++ b/src/lib/commands/fly.c @@ -103,7 +103,7 @@ fly(void) dst_type = EF_SHIP; } - if (ip && ip->i_vtype == I_CIVIL && target.sct_own != target.sct_oldown) { + if (ip && ip->i_uid == I_CIVIL && target.sct_own != target.sct_oldown) { pr("Can't fly civilians into occupied sectors.\n"); return RET_FAIL; } diff --git a/src/lib/commands/give.c b/src/lib/commands/give.c index 682a72f92..cc9b4b366 100644 --- a/src/lib/commands/give.c +++ b/src/lib/commands/give.c @@ -70,14 +70,14 @@ give(void) return RET_SYN; if ((amt = atoi(p)) == 0) return RET_SYN; - n = sect.sct_item[ip->i_vtype]; + n = sect.sct_item[ip->i_uid]; if (amt < 0 && -amt > n) { m = 0; } else if (amt > 0 && amt + n > ITEM_MAX) { m = ITEM_MAX; } else m = n + amt; - sect.sct_item[ip->i_vtype] = m; + sect.sct_item[ip->i_uid] = m; putsect(§); if (sect.sct_own != 0 && m != n) { if (m > n) { diff --git a/src/lib/commands/load.c b/src/lib/commands/load.c index 998d86b94..015b08363 100644 --- a/src/lib/commands/load.c +++ b/src/lib/commands/load.c @@ -725,7 +725,7 @@ static int load_comm_ship(struct sctstr *sectp, struct shpstr *sp, struct ichrstr *ich, int load_unload, int *nshipsp) { - i_type item = ich->i_vtype; + i_type item = ich->i_uid; struct mchrstr *mcp = &mchr[(int)sp->shp_type]; int ship_amt, ship_max, sect_amt, move_amt; int amount; @@ -928,7 +928,7 @@ static int load_comm_land(struct sctstr *sectp, struct lndstr *lp, struct ichrstr *ich, int load_unload, int *nunitsp) { - i_type item = ich->i_vtype; + i_type item = ich->i_uid; struct lchrstr *lcp = &lchr[(int)lp->lnd_type]; int land_amt, land_max, sect_amt, move_amt; int amount; diff --git a/src/lib/commands/lten.c b/src/lib/commands/lten.c index 16e75217b..7e338e17c 100644 --- a/src/lib/commands/lten.c +++ b/src/lib/commands/lten.c @@ -86,13 +86,13 @@ ltend(void) return RET_FAIL; if ((amt = atoi(p)) == 0) break; - ontender = tender.shp_item[ip->i_vtype]; + ontender = tender.shp_item[ip->i_uid]; if (ontender == 0 && amt > 0) { pr("No %s on %s\n", ip->i_name, prship(&tender)); return RET_FAIL; } vbase = &mchr[(int)tender.shp_type]; - maxtender = vbase->m_item[ip->i_vtype]; + maxtender = vbase->m_item[ip->i_uid]; if (maxtender == 0) { pr("A %s cannot hold any %s\n", mchr[(int)tender.shp_type].m_name, ip->i_name); @@ -111,14 +111,14 @@ ltend(void) if (target.lnd_ship != tender.shp_uid) continue; - ontarget = target.lnd_item[ip->i_vtype]; + ontarget = target.lnd_item[ip->i_uid]; if (ontarget == 0 && amt < 0) { pr("No %s on %s\n", ip->i_name, prland(&target)); continue; } lbase = &lchr[(int)target.lnd_type]; - maxtarget = lbase->l_item[ip->i_vtype]; + maxtarget = lbase->l_item[ip->i_uid]; if (amt < 0) { if (!player->owner) amt = 0; @@ -128,7 +128,7 @@ ltend(void) transfer = MIN(maxtender - ontender, transfer); if (transfer == 0) continue; - target.lnd_item[ip->i_vtype] = ontarget - transfer; + target.lnd_item[ip->i_uid] = ontarget - transfer; ontender += transfer; total += transfer; } else { @@ -137,7 +137,7 @@ ltend(void) transfer = MIN(transfer, maxtarget - ontarget); if (transfer == 0) continue; - target.lnd_item[ip->i_vtype] = ontarget + transfer; + target.lnd_item[ip->i_uid] = ontarget + transfer; ontender -= transfer; total += transfer; } @@ -151,7 +151,7 @@ ltend(void) pr("%d total %s transferred %s %s\n", total, ip->i_name, (amt > 0) ? "off of" : "to", prship(&tender)); - tender.shp_item[ip->i_vtype] = ontender; + tender.shp_item[ip->i_uid] = ontender; tender.shp_mission = 0; putship(tender.shp_uid, &tender); } diff --git a/src/lib/commands/mark.c b/src/lib/commands/mark.c index a28c2e146..e98b7800b 100644 --- a/src/lib/commands/mark.c +++ b/src/lib/commands/mark.c @@ -65,7 +65,7 @@ mark(void) ip = item_by_name(p); if (!ip) return RET_SYN; - return display_mark(ip->i_vtype, 0); + return display_mark(ip->i_uid, 0); } } return display_mark(I_NONE, 1); diff --git a/src/lib/commands/move.c b/src/lib/commands/move.c index 3b6d9991e..b231c1ae0 100644 --- a/src/lib/commands/move.c +++ b/src/lib/commands/move.c @@ -80,7 +80,7 @@ move(void) istest = *player->argp[0] == 't'; if ((ip = whatitem(player->argp[1], "move what? ")) == 0) return RET_SYN; - vtype = ip->i_vtype; + vtype = ip->i_uid; if (!(p = getstarg(player->argp[2], "from sector : ", buf))) return RET_SYN; if (!sarg_xy(p, &x, &y)) @@ -193,7 +193,7 @@ move(void) cmd_move_map, 0, &dam); if (dam) { - left = commdamage(amount, dam, ip->i_vtype); + left = commdamage(amount, dam, ip->i_uid); if (left < amount) { if (left) { pr("%d of the %s you were moving were destroyed!\n" diff --git a/src/lib/commands/orde.c b/src/lib/commands/orde.c index 182fa8f9f..3cd98a5d1 100644 --- a/src/lib/commands/orde.c +++ b/src/lib/commands/orde.c @@ -233,7 +233,7 @@ orde(void) level = 0; /* prevent negatives. */ pr("You must use positive number! Level set to 0.\n"); } - ship.shp_tstart[sub] = i1->i_vtype; + ship.shp_tstart[sub] = i1->i_uid; ship.shp_lstart[sub] = level; pr("Order Set \n"); break; @@ -253,7 +253,7 @@ orde(void) level = 0; pr("You must use positive number! Level set to 0.\n"); } - ship.shp_tend[sub] = i1->i_vtype; + ship.shp_tend[sub] = i1->i_uid; ship.shp_lend[sub] = level; pr("Order Set \n"); break; diff --git a/src/lib/commands/rout.c b/src/lib/commands/rout.c index 251e03d15..7295226ef 100644 --- a/src/lib/commands/rout.c +++ b/src/lib/commands/rout.c @@ -74,7 +74,7 @@ rout(void) if ((ip = whatitem(player->argp[1], "What item? ")) == 0) return RET_SYN; - i_del = ip->i_vtype;; + i_del = ip->i_uid;; if (player->argp[2] == NULL) { if ((str = getstring("(sects)? ", buf1)) == 0) return RET_SYN; diff --git a/src/lib/commands/sell.c b/src/lib/commands/sell.c index 524bd3a7e..ebb375d0b 100644 --- a/src/lib/commands/sell.c +++ b/src/lib/commands/sell.c @@ -131,7 +131,7 @@ sell(void) pr("Military control required to sell goods.\n"); return RET_FAIL; } - if ((amt = sect.sct_item[ip->i_vtype]) == 0) { + if ((amt = sect.sct_item[ip->i_uid]) == 0) { pr("You don't have any %s to sell there.\n", ip->i_name); return RET_FAIL; } @@ -145,7 +145,7 @@ sell(void) amt -= com; pr("Sold %d %s at %s (%d left)\n", com, ip->i_name, xyas(sect.sct_x, sect.sct_y, player->cnum), amt); - sect.sct_item[ip->i_vtype] = amt; + sect.sct_item[ip->i_uid] = amt; putsect(§); if (totalcom > 0) { for (ii = 0; getcomm(ii, &comm); ii++) { @@ -155,7 +155,7 @@ sell(void) if (getcomm(ii, &comm) == 0) ef_extend(EF_COMM, 1); (void)time(&now); - comm.com_type = ip->i_vtype; + comm.com_type = ip->i_uid; comm.com_owner = player->cnum; comm.com_price = price; comm.com_maxbidder = player->cnum; diff --git a/src/lib/commands/shoo.c b/src/lib/commands/shoo.c index df9634335..eaef97d7e 100644 --- a/src/lib/commands/shoo.c +++ b/src/lib/commands/shoo.c @@ -65,9 +65,9 @@ shoo(void) char buf[1024]; ip = whatitem(player->argp[1], "Shoot what "); - if (ip == 0 || (ip->i_vtype != I_CIVIL && ip->i_vtype != I_UW)) + if (ip == 0 || (ip->i_uid != I_CIVIL && ip->i_uid != I_UW)) return RET_SYN; - item = ip->i_vtype; + item = ip->i_uid; if (!snxtsct(&nstr, player->argp[2])) return RET_SYN; sprintf(prompt, "number of %s to shoot? ", ip->i_name); diff --git a/src/lib/commands/tend.c b/src/lib/commands/tend.c index 4771d1e75..dfdb6eadd 100644 --- a/src/lib/commands/tend.c +++ b/src/lib/commands/tend.c @@ -116,13 +116,13 @@ tend(void) pr("Amount must be non-zero!\n"); return RET_SYN; } - ontender = tender.shp_item[ip->i_vtype]; + ontender = tender.shp_item[ip->i_uid]; if (ontender == 0 && amt > 0) { pr("No %s on %s\n", ip->i_name, prship(&tender)); return RET_FAIL; } vbase = &mchr[(int)tender.shp_type]; - maxtender = vbase->m_item[ip->i_vtype]; + maxtender = vbase->m_item[ip->i_uid]; if (maxtender == 0) { pr("A %s cannot hold any %s\n", mchr[(int)tender.shp_type].m_name, ip->i_name); @@ -144,13 +144,13 @@ tend(void) if (tender.shp_x != target.shp_x || tender.shp_y != target.shp_y) continue; - ontarget = target.shp_item[ip->i_vtype]; + ontarget = target.shp_item[ip->i_uid]; if (ontarget == 0 && amt < 0) { pr("No %s on %s\n", ip->i_name, prship(&target)); continue; } vbase = &mchr[(int)target.shp_type]; - maxtarget = vbase->m_item[ip->i_vtype]; + maxtarget = vbase->m_item[ip->i_uid]; if (amt < 0) { if (!player->owner) amt = 0; @@ -160,7 +160,7 @@ tend(void) transfer = MIN(maxtender - ontender, transfer); if (transfer == 0) continue; - target.shp_item[ip->i_vtype] = ontarget - transfer; + target.shp_item[ip->i_uid] = ontarget - transfer; ontender += transfer; total += transfer; } else { @@ -169,7 +169,7 @@ tend(void) transfer = MIN(transfer, maxtarget - ontarget); if (transfer == 0) continue; - target.shp_item[ip->i_vtype] = ontarget + transfer; + target.shp_item[ip->i_uid] = ontarget + transfer; ontender -= transfer; total += transfer; } @@ -187,7 +187,7 @@ tend(void) wu(0, target.shp_own, "%s tended %d %s to %s\n", cname(player->cnum), total, ip->i_name, prship(&target)); } - tender.shp_item[ip->i_vtype] = ontender; + tender.shp_item[ip->i_uid] = ontender; tender.shp_mission = 0; putship(tender.shp_uid, &tender); } diff --git a/src/lib/commands/thre.c b/src/lib/commands/thre.c index 80a03e84e..dd79ecae3 100644 --- a/src/lib/commands/thre.c +++ b/src/lib/commands/thre.c @@ -64,7 +64,7 @@ thre(void) return RET_SYN; if (!snxtsct(&nstr, player->argp[2])) return RET_SYN; - type = ip->i_vtype; + type = ip->i_uid; if (player->argp[3] && *player->argp[3] && (*player->argp[3] < '0' || *player->argp[3] > '9')) { pr("Threshold must be a number\n"); diff --git a/src/lib/global/nsc.c b/src/lib/global/nsc.c index fb99a8266..9f71ea68c 100644 --- a/src/lib/global/nsc.c +++ b/src/lib/global/nsc.c @@ -83,7 +83,7 @@ NSC_IELT("uw", "u", sfx, base, I_UW), \ NSC_IELT("rad", "r", sfx, base, I_RAD) struct castr ichr_ca[] = { - {NSC_SITYPE(i_type), 0, 0, offsetof(struct ichrstr, i_vtype), "vtype", + {NSC_SITYPE(i_type), 0, 0, offsetof(struct ichrstr, i_uid), "uid", EF_ITEM}, {NSC_STRING, 0, 0, offsetof(struct ichrstr, i_name), "name", EF_BAD}, {NSC_STRINGY, NSC_CONST, 1, offsetof(struct ichrstr, i_mnem), "mnem", diff --git a/src/lib/subs/mission.c b/src/lib/subs/mission.c index 5f8ccbc22..22e0ddbd7 100644 --- a/src/lib/subs/mission.c +++ b/src/lib/subs/mission.c @@ -1272,13 +1272,13 @@ mission_pln_equip(struct plist *plp, struct ichrstr *ip, int flags, case 't': if ((pcp->pl_flags & P_C) == 0 || ip == 0) break; - itype = ip->i_vtype; + itype = ip->i_uid; needed = (pp->pln_load * 2) / ip->i_lbs; break; case 'd': if ((pcp->pl_flags & P_C) == 0 || ip == 0) break; - itype = ip->i_vtype; + itype = ip->i_uid; needed = (pp->pln_load * 2) / ip->i_lbs; break; case 'a': diff --git a/src/lib/subs/plnsub.c b/src/lib/subs/plnsub.c index 1c56c5acf..8bccf936e 100644 --- a/src/lib/subs/plnsub.c +++ b/src/lib/subs/plnsub.c @@ -303,18 +303,18 @@ pln_dropoff(struct emp_qelem *list, struct ichrstr *ip, coord tx, coord ty, xyas(tx, ty, player->cnum)); return; } - if (ip->i_vtype == I_CIVIL && sectp->sct_own != sectp->sct_oldown) { + if (ip->i_uid == I_CIVIL && sectp->sct_own != sectp->sct_oldown) { pr("%s is occupied. Your civilians suffer from identity crisis and die.\n", xyas(tx, ty, player->cnum)); return; } - there = sectp->sct_item[ip->i_vtype]; + there = sectp->sct_item[ip->i_uid]; max = ITEM_MAX; } else { sp = ptr; - there = sp->shp_item[ip->i_vtype]; + there = sp->shp_item[ip->i_uid]; mp = &mchr[(int)sp->shp_type]; - max = mp->m_item[ip->i_vtype]; + max = mp->m_item[ip->i_uid]; } there += amt; if (there > max) { @@ -325,7 +325,7 @@ pln_dropoff(struct emp_qelem *list, struct ichrstr *ip, coord tx, coord ty, pr("%d %s landed safely", amt, ip->i_name); if (type == EF_SECTOR) { sectp = ptr; - sectp->sct_item[ip->i_vtype] = there; + sectp->sct_item[ip->i_uid] = there; if (sectp->sct_own != player->cnum) wu(0, sectp->sct_own, "%s planes drop %d %s in %s\n", cname(player->cnum), amt, ip->i_name, @@ -334,7 +334,7 @@ pln_dropoff(struct emp_qelem *list, struct ichrstr *ip, coord tx, coord ty, putsect((struct sctstr *)ptr); } else { struct shpstr *sp = (struct shpstr *)ptr; - sp->shp_item[ip->i_vtype] = there; + sp->shp_item[ip->i_uid] = there; if (sp->shp_own != player->cnum) wu(0, sp->shp_own, "%s planes land %d %s on carrier %d\n", cname(player->cnum), amt, ip->i_name, sp->shp_uid); @@ -632,7 +632,7 @@ pln_equip(struct plist *plp, struct ichrstr *ip, int flags, s_char mission) own = sect.sct_oldown; } if (ip) { - if (ip->i_vtype == I_CIVIL) { + if (ip->i_uid == I_CIVIL) { if (pp->pln_own != own) { pr("You don't control those civilians!\n"); return -1; @@ -660,7 +660,7 @@ pln_equip(struct plist *plp, struct ichrstr *ip, int flags, s_char mission) case 'd': if ((pcp->pl_flags & P_C) == 0 || ip == 0) break; - itype = ip->i_vtype; + itype = ip->i_uid; needed = (pp->pln_load * 2) / ip->i_lbs; break; case 'm': diff --git a/src/lib/subs/trdsub.c b/src/lib/subs/trdsub.c index 9a7542d77..b6a8fe538 100644 --- a/src/lib/subs/trdsub.c +++ b/src/lib/subs/trdsub.c @@ -253,9 +253,9 @@ get_couval(int cnum) secttot += (long)(dchr[sp->sct_type].d_value * ((float)sp->sct_effic + 100.0)); for (k = 0; ichr[k].i_name; k++) { - if (ichr[k].i_value == 0 || ichr[k].i_vtype == I_NONE) + if (ichr[k].i_value == 0 || ichr[k].i_uid == I_NONE) continue; - val = sp->sct_item[ichr[k].i_vtype]; + val = sp->sct_item[ichr[k].i_uid]; secttot += val * ichr[k].i_value; } } diff --git a/src/lib/update/deliver.c b/src/lib/update/deliver.c index 0ea7dc045..555e0f879 100644 --- a/src/lib/update/deliver.c +++ b/src/lib/update/deliver.c @@ -80,7 +80,7 @@ deliver(struct sctstr *from, struct ichrstr *ip, int dir, return 0; } dp = &dchr[from->sct_type]; - vtype = ip->i_vtype; + vtype = ip->i_uid; mobility = from->sct_mobil / 2; if (vtype == I_CIVIL) { if (from->sct_own != from->sct_oldown) { -- 2.43.0