nmrih / source-game

Bugs and issues reporting for NMRiH1
http://store.steampowered.com/app/224260
58 stars 25 forks source link

[dev-1.13.5] Missing inventory box background until item_inventory_box spawns #1462

Closed dysphie closed 3 months ago

dysphie commented 3 months ago

Repro:

The supply crate UI will have no background. After spawning an actual supply crate, the background will render

image

Code:

#include <sourcemod>

public void OnPluginStart()
{
    RegConsoleCmd("sm_inv", Cmd_Inv);
}

Action Cmd_Inv(int client, int args)
{
    client      = 1;

    Handle  msg = StartMessageOne("ItemBoxOpen", client, USERMSG_RELIABLE | USERMSG_BLOCKHOOKS);
    BfWrite bf  = UserMessageToBfWrite(msg);
    bf.WriteShort(1337);

    for (int i = 0; i < 20; i++)
    {
        int id = GetRandomInt(1, 67);
        bf.WriteShort(id);
    }

    EndMessage();

    return Plugin_Handled;
}
dysphie commented 3 months ago

Additionally it will display the wrong background afterwards for ItemBoxOpenUncategorized

image

felis-catus commented 3 months ago

Fixed in src-r7367.