Skip to content

Multiple fixes - #35

Draft
MyGamepedia wants to merge 27 commits into
SonicEraZoR:masterfrom
MyGamepedia:mltpl-fxes
Draft

MyGamepedia wants to merge 27 commits into
SonicEraZoR:masterfrom
MyGamepedia:mltpl-fxes

Conversation

@MyGamepedia

@MyGamepedia MyGamepedia commented Mar 15, 2026

Copy link
Copy Markdown
Contributor

All NPCs:

  • Fixed NPCs not blinking.

Strider:

  • Replaced portal_gamerules's GetAmmoDef() with version from hl2 to fix npc_strider not shooting in aggro mode.

Barnacle:

  • Fixed npc_barnacle crash on Portal turrets.

Combine S:

  • Fixed npc_combine_s not playing pain sounds.

Security camera:

  • Now npc_security_camera will apply damage properly.
  • Now npc_security_camera will use proper values for BBOX.
  • Fixed detached npc_security_camera reenabling sprite and loop sounds.
  • Now npc_security_camera can be detached by damage if received value from sk_securitycamera_detach_by_damage or more, can be disabled with -1 val on sk_securitycamera_detach_by_damage.
  • Now weapon_physcannon can detach npc_security_camera by punt.
  • Now weapon_physcannon can grab, pull and punt npc_security_camera properly.
  • Fixed npc_security_camera crash in mp when detached (needs a better code).

Rocket turret:

  • Added a compatible with mp code for npc_rocket_turret's laser.

Grenades:

  • SMG1 grenade now will remove particles properly when cleansed.
  • RPG grenade now will remove effects properly and stop sounds when cleansed.

Cleanser:

  • Added prop_combine_ball to trigger_portal_cleanser filter.
  • Now trigger_portal_cleanser will save most visual params of cleansed object.

Viewmodel:

  • Broken CalcViewModelView for C_Portal_Player is now disabled by default and can be toggled with cl_portalbase_use_portal_player_calcviewmodelview convar. This fixes multiple issues with viewmodels.

Physics:

  • Added sv_portalbase_no_interactive_debris_reset convar to prevent debris becoming not interactive debris to fix multiple issues portals.
  • Replaced COLLISION_GROUP_DEBRIS with COLLISION_GROUP_INTERACTIVE_DEBRIS for needed parts of code to fix multiple cases when debris don't work with portals.
  • Fixed spin_none param not working for props.
  • Fixed sticky objects not stucking at walls after passing linked portals by increasing MAXIMUM_PORTAL_EXIT_VELOCITY from 1000 to 1500.
  • Now portals will enable motion for stucked in the wall sticky props.

Misc:

  • Added IsSecurityCamera() for all entites, returns true only for npc_security_camera.
  • Fixed mp crash when the player touched portal.
  • Added IsPortalGun for weapon_portalgun on client.

List from other big commit:
Big changes:

  • Projected texture fixes from this page (https://developer.valvesoftware.com/wiki/Env_projectedtexture/fixes), doesn't include shader changes as they seems to be broken. These fixes also fixes rendering bug with flashlight if it is behind a glass and 2 portals look at it.
  • Crossbow bolts stick reworked to work with portals.
  • Portal gamerules are now default and done lots of fixes + options by convars.
  • Portal tracer filter isn't hardcoded anymore, now it will take classes for script file list.
  • All ragdolls are now server side and enabled by default. Done lots of fixes for gibs and zombies, also ragdolls will do self collide, save blood decals, pushed when needed, save more visual data.
  • Ragdolls created by NPCs now will be stored in m_hMyCorpuse for cases if can't access directly.
  • Added entity env_touch_area, used by weapons and items as touch area player, so items and weapons can pass portals. Controlled by sv_portalbase_item_touch_area.
  • Portal tracer can't pass water and slime unless allowed by sv_portalbase_portal_placement_ignore_liquid.
  • Portal tracer can't place portals on displacement surfs.
  • Added sv_portalbase_use_stunstick_for_armor to control if we want to get armor or stunstick (done for tracer tests).
  • Reworked some parts of code for portal player under mp.
  • Radio ARG is now optional by sv_portalbase_portalgamerules_use_radio_arg.
  • Portalgun now will play a sound when underwater.
  • Portalgun's fast fire in now optional by sv_portalbase_portalgun_fast_refire.
  • Added optional Schrodinger crouch fix via sv_portalbase_no_schrodinger_crouch.
  • (WIP) Portalbase weapon fixes.
    Reworked:
  • Stickied props are now filtered by m_bStickied field.
  • Now crossbow bolts can pass func_breakable if it is glass, controlled by sv_portalbase_crossbowbolt_pass_func_breakable_glass.
    Fixes:
  • env_sun will not blink when the client view angle direction look at the sun center.
  • View push from weapons now will work with portals.
  • Lighting teleported by portals now will be turned off when portal is placed while cl_portalbase_emit_light_teleport is disabled.
  • Viewmodels will not be reflected when you zoom in.
  • Combine drop ship can now rotate the gun position.
  • Rollermines, turrets and security camera will not create duplicate ents when pulled by mega physcannon.
  • sv_portalbase_elite_combine_s_can_fire_smg1_grenade convar to controll if smg1 can work with EVENT_WEAPON_AR2_ALTFIRE.
    Minor:
  • Lots of methods to define ents in a fast way.
  • Portalgun can be defined on client by IsPortalGun().
  • Renamed cl_portal_emit_light_teleport to cl_portalbase_emit_light_teleport.
  • sv_portalbase_debug_physicsshadowclone_display to display physicsshadowclone model.
  • Cleansed objects now includes fade distance.
    Crashes:
  • Client crash fix from debug builds in C_BaseAnimating::PopBoneAccess.
  • Server crash fix caused by prop_ragdoll having no model.
  • Physics crash fix caused by prop_ragdoll having not default model scale value.
  • Server crash fix caused by physcannon dropping object while in portal.
  • Server crash fix caused by bolts when they aren't teleported properly.

- Replaced COLLISION_GROUP_DEBRIS with COLLISION_GROUP_INTERACTIVE_DEBRIS for needed parts of code to fix multiple cases when debris don't work with portals.
- Fixed NPCs not blinking.
- Added a compatible with mp code for npc_rocket_turret's laser.
- Broken CalcViewModelView for C_Portal_Player is now disabled by default and can be toggled with cl_portalbase_use_portal_player_calcviewmodelview convar. This fixes multiple issues with viewmodels.
- Added IsPortalGun for weapon_portalgun on client.
- Added IsSecurityCamera() for all entites, returns true only for npc_security_camera.
- SMG1 grenade now will remove particles properly when cleansed.
- Fixed npc_barnacle crash on Portal turrets.
- Fixed npc_combine_s not playing pain sounds.
- RPG grenade now will remove effects properly and stop sounds when cleansed.
- Fixed spin_none param not working for props.
- Now npc_security_camera will apply damage properly.
- Now npc_security_camera will use proper values for BBOX.
- Fixed detached npc_security_camera reenabling sprite and loop sounds.
- Now npc_security_camera can be detached by damage if received value from sk_securitycamera_detach_by_damage or more, can be disabled with -1 val on sk_securitycamera_detach_by_damage.
- Now weapon_physcannon can detach npc_security_camera by punt.
- Now weapon_physcannon can grab, pull and punt npc_security_camera properly.
- Fixed npc_security_camera crash in mp when detached (needs a better code).
- Fixed sticky objects not stucking at walls after passing linked portals by increasing  MAXIMUM_PORTAL_EXIT_VELOCITY from 1000 to 1500.
- Now portals will enable motion for stucked in the wall sticky props.
- Added prop_combine_ball to trigger_portal_cleanser filter.
- Now trigger_portal_cleanser will save most visual params of cleansed object.
- Added sv_portalbase_no_interactive_debris_reset convar to prevent debris becoming not interactive debris to fix multiple issues portals.
- Replaced portal_gamerules's GetAmmoDef() with version from hl2 to fix NPC strider not shooting in aggro mode.
- Fixed mp crash when the player touched portal.
@MyGamepedia
MyGamepedia marked this pull request as draft March 26, 2026 12:28
@MyGamepedia MyGamepedia changed the title Fixes for npcs, cleanser, viewmodel, grenades, physics, mp Multiple fixes (WIP) Mar 26, 2026
This one is pushed for bug analysis. Changes:
Big changes:
- Projected texture fixes from this page (https://developer.valvesoftware.com/wiki/Env_projectedtexture/fixes), doesn't include shader changes as they seems to be broken. These fixes also fixes rendering bug with flashlight if it is behind a glass and 2 portals look at it.
- Crossbow bolts stick reworked to work with portals.
- Portal gamerules are now default and done lots of fixes + options by convars.
- Portal tracer filter isn't hardcoded anymore, now it will take classes for script file list.
- All ragdolls are now server side and enabled by default. Done lots of fixes for gibs and zombies, also ragdolls will do self collide, save blood decals, pushed when needed, save more visual data.
- Ragdolls created by NPCs now will be stored in m_hMyCorpuse for cases if can't access directly.
- Added entity env_touch_area, used by weapons and items as touch area player, so items and weapons can pass portals. Controlled by sv_portalbase_item_touch_area.
- Portal tracer can't pass water and slime unless allowed by sv_portalbase_portal_placement_ignore_liquid.
- Portal tracer can't place portals on displacement surfs.
- Added sv_portalbase_use_stunstick_for_armor to control if we want to get armor or stunstick (done for tracer tests).
- Reworked some parts of code for portal player under mp.
- Radio ARG is now optional by sv_portalbase_portalgamerules_use_radio_arg.
- Portalgun now will play a sound when underwater.
- Portalgun's fast fire in now optional by sv_portalbase_portalgun_fast_refire.
- Added optional Schrodinger crouch fix via sv_portalbase_no_schrodinger_crouch.
- (WIP) Portalbase weapon fixes.
Reworked:
- Stickied props are now filtered by m_bStickied field.
- Now crossbow bolts can pass func_breakable if it is glass, controlled by sv_portalbase_crossbowbolt_pass_func_breakable_glass.
Fixes:
- env_sun will not blink when the client view angle direction look at the sun center.
- View push from weapons now will work with portals.
- Lighting teleported by portals now will be turned off when portal is placed while cl_portalbase_emit_light_teleport is disabled.
- Viewmodels will not be reflected when you zoom in.
- Combine drop ship can now rotate the gun position.
- Rollermines, turrets and security camera will not create duplicate ents when pulled by mega physcannon.
- sv_portalbase_elite_combine_s_can_fire_smg1_grenade convar to controll if smg1 can work with EVENT_WEAPON_AR2_ALTFIRE.
Minor:
- Lots of methods to define ents in a fast way.
- Portalgun can be defined on client by IsPortalGun().
- Renamed cl_portal_emit_light_teleport to cl_portalbase_emit_light_teleport.
- sv_portalbase_debug_physicsshadowclone_display to display physicsshadowclone model.
- Cleansed objects now includes fade distance.
Crashes:
- Client crash fix from debug builds in C_BaseAnimating::PopBoneAccess.
- Server crash fix caused by prop_ragdoll having no model.
- Physics crash fix caused by prop_ragdoll having  not default model scale value.
- Server crash fix caused by physcannon dropping object while in portal.
- Server crash fix caused by bolts when they aren't teleported properly.
- added empty sound to portalgun's script
- weapons now will use SOLID_VPHYSICS instead of SOLID_BBOX while sv_portalbase_item_touch_area enabled
- touch area won't appear if item/weapon marked for remove
- moved g_PortalTraceIgnoreList from .h to .cpp file
- Added proper logic with new touch system for CBaseCombatWeapon::FallInit and CBaseCombatWeapon::Materialize.
- Added IsPhyscannon() method (was planned to use, keep it for now).
- Now physcannon will use proper touch area size and pass portals.
- Added proper logic in CWeaponPhysCannon::WaitForUpgradeThink for new touch system.
- Now all weapons will use their proper trigger bounds size.
- Now portalgun will use proper trigger bounds size.
fixed error msg caused by dif func pointers used by shared convar, the way i used is kinda a hack, but it works
- Fixed issue when weapon_357 caused double sound because of world model. Now this won't happen but also don't let weapons to spam the console.
- Fixed assert caused by InstallChangeCallback on portalbase_portal_trace_filter_file reset.
- Removed files we won't use.
- (WIP) Weapon code clean up I was doing before, but now even more. This still needs some tests on my side. Overall, weapons should run their code x2 faster and unused parts are removed.
…server

now it is split to sv_portalbase_portal_trace_filter_file and cl_portalbase_portal_trace_filter_file with server version tirggering update for each client
@MyGamepedia
MyGamepedia marked this pull request as ready for review March 28, 2026 15:25
@MyGamepedia MyGamepedia changed the title Multiple fixes (WIP) Multiple fixes Mar 28, 2026
@MyGamepedia
MyGamepedia marked this pull request as draft April 20, 2026 22:46
- Added hl2 game movement, needs some fixes.
- No more p1 land sound if fall protection is disabled.
- Weapons now use touch areas.
- Added "includeportalsview" keyvalue for trigger_look and loigic to work with portals.
- Added support for VPhysics server debris for breakable brushes and NPCs.
- Now weapon_physcannon works with portals (everything). Still need to finish client sprites code. Needs clean up.
- Fixed poison damage not causing flash.
- Rewroked stunstick pick up code.
- Added server ragdolls death pose.
- Added support for VPhysics shells (EjectBrass) support. This also adds vm attach pos transfer from client to server. Needed to make weapon_pistol shells optional (hardcoded now). Needs clean up.
- Now props that should fade while not in player's FOV won't disappear if visiable via portals, unless forced.
- Added limited recursive portal vision check for combat characters. Needs clean up.
- Attempt to fix 3D skybox in portal view (doesn't work).
- Limited portal stencil depth up to 2, for better perf.
- Now server won't type notes about convar changes (such as sv_cheats) unless in mp.
- Now func_occluder won't hide objects for portal view.
- Added missing ! to the code for hl2 mv.
- Added Portal 2's fix for Save Glitch to avoid issues with consistency for portal environment collision. Optional by sv_portalbase_save_glitch.
- Added Edge Glitch fix to the player using virtaul camera position for portal shoot. Optional by sv_portalbase_edge_glitch.
- Fixed bug when you could get hit by weapon's projectile if you stand too close to a open linked portal. Now projectiles will pass portal (as expected).
- Reworked bullet pass code, now the same hitscan bullet can pass portals 16 times (just like beams).
-- Reworked bullet pass visuals for this, done by AI, needs more tests (method "void CBaseEntity::FireBullets(const FireBulletsInfo_t& info)").
- Reworked edge glitch fix code.
- Now the middle portal shoot (the thing that was causing edge glitch) code applied for all projectile weapons.
- Removed sv_portalbase_save_glitch with save glitch fix for now due to stuck issues.
- Fixed bug when vphysics shells could hit a wall if you stand too close to a open linked portal. Now shells will pass portal (as expected).
- Added sv_portalbase_hardcoded_ejectbrassphysics_for_pistol convar to make shell for pistol's viewmodel not hardcoded.
- Now viewmodel will transfer muzzle flash events on world models to create NPC muzzle flash effect versions for the player. Used by portal view for the player weapons.
- Now viewmodel's muzzle flash doesn't render in portal view.
- Now NPC muzzle flash effects created by the player won't appear in main view.
- Used NPC pistol muzzle flash effect version for 357 weapon.
- Fixed bug when rpg_missile and npc_grenade_bugbait could be owned by portals outside of OBB area, making them passing the world.
- rpg_missile now will calc the shortest path and use portals, instead of always moving towards laser dot pos. Optional by sv_portalbase_rpg_missile_portal_logic convar, debug can be enabled via sv_portalbase_debug_rpg_missile_portal_logic convar.
- Removed server sprites from crossbow and added client class for crossbow to render two different sprites, first for portals, second for main view.
- Added not working code for crossbow sparks rendering.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant