Skip to content

Propcores propCanCreate() and sentCanCreate() doesn't actually check if it can create said entities #3383

@unknao

Description

@unknao

Both of these functions only look to see if the prop burst limit is met or not, they don't take into account the player being blocked from spawning props by any other means, including the prop/sent limit.

Example code:

@strict

propSpawnUndo(0)
event tick() {
    if(!propCanCreate()){ exit() }
    
    let E = propSpawn("models/props_junk/CinderBlock01a.mdl", entity():pos(), ang(), 1)
    if(!E:isValid()){
        print("This should never run!")
    }
}

It will print "This should never run!" after the player prop limit has been reached.

Metadata

Metadata

Assignees

No one assigned

    Labels

    E2This issue is related to E2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions