Giter VIP home page Giter VIP logo

noblock-for-mg's Introduction

[SourceMod/CS:GO] NoBlock for MG

Yet another NoBlock plugin designed to be used on MG servers (multi games and courses) with zero configuration (i.e., no divergence on cvars). This plugin solves player's collision on moving platforms and grenade projectile collision at the same time.


Usage

Prerequisites

NoBlock for MG depends on the following extensions:

Installation

  • Install DHooks2 and SendProxy
  • Download plugin files from releases (or compile the plugin source by your own)
  • Copy noblock.smx to csgo/addons/sourcemod/plugins
  • Copy noblock.games.txt to csgo/addons/sourcemod/gamedata

ConVars

  • mp_solid_teammates: any (Recommended: 1)
  • cs_enable_player_physics_box: any
  • sv_turbophysics: any (Recommended: 0)

ConVars added by this plugin

NOTE: This plugin is designed to be used with zero configuration. In almost 100% of cases, you don't need to touch the following cvars.

  • sm_noblock 1
    • Enables this noblock feature.
    • Default value is 1
  • sm_noblock_ignore_projectiles 0
    • Regardless of this setting, this plugin solves the issue that players get stuck with grenade projectiles and cannot move for a while.
    • By setting this cvar to 0, projectiles are still collideable with players so they can apply damage on hit.
    • By setting this cvar to 1, projectiles become completely non-collideable with players.
    • Default value is 0

Comparison

Here is the comparison between traditional noblock plugins and NoBlock for MG.

CollisionGroup Entity's ShouldCollide NoBlock for MG
Prevents players sticking with each other on moving platforms -
Avoid stuck and position gets rollbacked by the engine after teleport -
Prevents players sticking with grenade projectiles -
Grenade projectiles can hit and damage players -
Prevents players penetrating to vphys-based world collision (e.g., func_brush) -
Clients can predict them as if players are non-collideable each other
  • CollisionGroup method:
    • Sets player's collision group to COLLISION_GROUP_DEBRIS_TRIGGER
  • Entity's ShouldCollide method:
    • Overrides player entity's ShouldCollide method
    • Fakes player's collision group as COLLISION_GROUP_DEBRIS_TRIGGER by using SendProxy
  • NoBlock for MG:
    • Overrides CGameRules::ShouldCollide by using DHook
    • Fakes player's collision group as COLLISION_GROUP_DEBRIS_TRIGGER by using SendProxy

Performance Concerns

Even though CGameRules::ShouldCollide gets called gazillion times in extreme scenarios like many non-hibernated vphys-props collide with each other on vphys-based platforms, this plugin should be almost harmless since the rest of the part in collision detection code takes the most of the processing time. If you think this plugin causes huge server lag, try sm_noblock 0 to temporarily disable the DHook on CGameRules::ShouldCollide and see if this plugin is the criminal.

Known Issues

  • Grenade projectiles can stop moving platforms when it collides with player and platform at the same time. For now, use sm_noblock_ignore_projectiles 1 if you dislike this behavior, and you can forgive projectiles passing through players.
  • Players cannot stand on hostages

Acknowledgements

  • The idea to override ShouldCoillide and pretend player's CollisionGroup via SendProxy came from Bakros's NoBlock plugin. Huge thanks to Bakros.
  • Thanks to the contributors of NoBlock, DHooks and SendProxy.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.