dysphie / nmrih-backpack2

Sourcemod plugin for No More Room in Hell that adds backpacks
9 stars 5 forks source link

[bug] sometime can not drop something to the backpack #10

Closed RubyKiss closed 2 years ago

RubyKiss commented 2 years ago

sm_backpack_count set to 8 and then one people join server play a round,and then second people join the server, can not be drop somethinkg to the backpack after restart round ..

do you understand my talking about>_<.

english so bad.

RubyKiss commented 2 years ago

tested!

numDroppedBackpacks is -1. so can not drop some to that

RubyKiss commented 2 years ago

maybe this failed

    void Delete()
    {
        this.EndUseForAll();

        int wearer = EntRefToEntIndex(this.wearerRef);
        if (wearer == -1) {
            numDroppedBackpacks--;
//i try it fix
**************************************************************************************
            if(numDroppedBackpacks<0){
                //fix -1
                numDroppedBackpacks=0;
            }
**************************************************************************************
//fix -end
        } else {
            wearingBackpack[wearer] = false;
        }
dysphie commented 2 years ago

Hi, thanks for the report. Are you on version 2.0.12? If not, upgrade and let me know if the issue persists.

RubyKiss commented 2 years ago

yes

RubyKiss commented 2 years ago

Hi, thanks for the report. Are you on version 2.0.12? If not, upgrade and let me know if the issue persists.

i look new source had a new code is if <0 then =0,is fixed?

RubyKiss commented 2 years ago

Hi, thanks for the report. Are you on version 2.0.12? If not, upgrade and let me know if the issue persists.

i download in the sourcemod webside😂 is not new code release,is ok! thank's