From: TimePath Date: Wed, 13 May 2015 05:54:31 +0000 (+1000) Subject: Tidy up X-Git-Tag: xonotic-v0.8.1~53^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5274a2603b20b0de14ac1983574e8ffe1e8a1876;p=xonotic%2Fxonotic-data.pk3dir.git Tidy up --- diff --git a/qcsrc/common/items/inventory.qh b/qcsrc/common/items/inventory.qh index 9b277bf67..89abc97cf 100644 --- a/qcsrc/common/items/inventory.qh +++ b/qcsrc/common/items/inventory.qh @@ -16,8 +16,9 @@ void Inventory_Read(Inventory data) { const int bits = ReadInt24_t(); ITEMS_FOREACH(bits & BIT(i), LAMBDA({ - int prev = data.inv_items[i]; - int next = data.inv_items[i] = ReadByte(); + .int fld = inv_items[i]; + int prev = data.(fld); + int next = data.(fld) = ReadByte(); dprintf("%s: %.0f -> %.0f\n", ITEMS[i].m_name, prev, next); })); } @@ -28,8 +29,8 @@ void Inventory_Write(Inventory data) { int bits = 0; ITEMS_FOREACH(true, LAMBDA({ - .int idx = inv_items[i]; - bits = BITSET(bits, BIT(i), data.inventory.(idx) != (data.inventory.(idx) = data.(idx))); + .int fld = inv_items[i]; + bits = BITSET(bits, BIT(i), data.inventory.(fld) != (data.inventory.(fld) = data.(fld))); })); WriteInt24_t(MSG_ENTITY, bits); ITEMS_FOREACH(bits & BIT(i), LAMBDA({ diff --git a/qcsrc/server/mutators/mutator_instagib.qc b/qcsrc/server/mutators/mutator_instagib.qc index 7f97ba131..14a8c6bcb 100644 --- a/qcsrc/server/mutators/mutator_instagib.qc +++ b/qcsrc/server/mutators/mutator_instagib.qc @@ -18,13 +18,13 @@ GETTER(float, instagib_respawntimejitter_ammo) REGISTER_ITEM(VaporizerCells, Pickup, MAP(IDENTITY ,IF(ALL, CONFIGURE , model = "models/items/a_cells.md3" - , sound = "misc/itempickup.wav" + , sound = "misc/itempickup.wav" , name = "Vaporizer Ammo" ) ,IF(SV, CONFIGURE , botvalue = 100 , itemid = IT_CELLS - , respawntime = GET(instagib_respawntime_ammo) + , respawntime = GET(instagib_respawntime_ammo) , respawntimejitter = GET(instagib_respawntimejitter_ammo) ) )) @@ -32,14 +32,14 @@ REGISTER_ITEM(VaporizerCells, Pickup, MAP(IDENTITY REGISTER_ITEM(ExtraLife, Pickup, MAP(IDENTITY ,IF(ALL, CONFIGURE , model = "models/items/g_h100.md3" - , sound = "misc/megahealth.wav" + , sound = "misc/megahealth.wav" , name = "Extralife" ) ,IF(SV, CONFIGURE , botvalue = BOT_PICKUP_RATING_HIGH - , itemflags = FL_POWERUP + , itemflags = FL_POWERUP , itemid = IT_NAILS - , respawntime = GET(g_pickup_respawntime_powerup) + , respawntime = GET(g_pickup_respawntime_powerup) , respawntimejitter = GET(g_pickup_respawntimejitter_powerup) ) ))