Skip to content

feat: Initial release #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
90 changes: 90 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: CI

on: [push, pull_request, workflow_dispatch]

jobs:
build:
name: "Build"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04]
include:
- os: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Build sourcemod plugin
uses: maxime1907/action-sourceknight@v1
with:
cmd: build

- name: Create package
run: |
mkdir -p /tmp/package
cp -R .sourceknight/package/* /tmp/package
cp -R materials /tmp/package/common/
cp -R models /tmp/package/common/

- name: Upload build archive for test runners
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}
path: /tmp/package

tag:
name: Tag
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'

- uses: dev-drprasad/[email protected]
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
with:
delete_release: true
tag_name: latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: rickstaa/action-create-tag@v1
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
with:
tag: "latest"
github_token: ${{ secrets.GITHUB_TOKEN }}

release:
name: Release
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
needs: [build, tag]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4

- name: Versioning
run: |
version="latest"
if [[ "${{ github.ref_type }}" == 'tag' ]]; then
version=`echo $GITHUB_REF | sed "s/refs\/tags\///"`;
fi
echo "RELEASE_VERSION=$version" >> $GITHUB_ENV

- name: Package
run: |
ls -Rall
if [ -d "./Linux/" ]; then
cd ./Linux/
tar -czf ../${{ github.event.repository.name }}-${{ env.RELEASE_VERSION }}.tar.gz -T <(\ls -1)
cd -
fi

- name: Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: '*.tar.gz'
tag: ${{ env.RELEASE_VERSION }}
file_glob: true
overwrite: true
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
build/
release/

.DS_Store
.vscode

*.smx
plugins/
.sourceknight
.venv
46 changes: 45 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,46 @@
# sm-plugins-FixMapFiles
Download fixed files for multiple maps

A SourceMod plugin that automatically downloads and applies fixed files for specific maps in Counter-Strike: Source.

## Description

This plugin automatically applies necessary file fixes for specific maps when they are loaded. It handles two main types of fixes:

1. Paranoid Rezurrection specific fixes
2. Gargantua model fixes (applies to multiple maps)

## Supported Maps

### Maps with Paranoid + Gargantua Fixes
- `ze_paranoid_rezurrection_v11_9`

### Maps with Gargantua Fixes Only
- `ze_avalanche_reboot_beta7`
- `ze_l0v0l_v1_4`
- `ze_mountain_escape_v5_zy`
- `ze_Pidaras_v1_4fix3`
- `ze_sandstorm_css_v1_5x3`
- `ze_tyranny_v5fix`

## Features

### Paranoid Rezurrection Fixes
- Adds fixed BSOD (Blue Screen of Death) textures
- Fixes metal vent decals
- Adds all items mode textures

### Gargantua Model Fixes
- Applies fixed Gargantua model files
- Includes all necessary model files and textures
- Fixes model compatibility issues

## Installation

1. Place the compiled plugin in your server's `addons/sourcemod/plugins` directory
2. Ensure all required files are present in your server's `cstrike/*` directory
3. The plugin will automatically apply fixes when supported maps are loaded

## Requirements

- SourceMod 1.10 or higher
- Counter-Strike: Source
64 changes: 64 additions & 0 deletions addons/sourcemod/scripting/FixMapsFiles.sp
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>
#include <sdktools>

public Plugin myinfo =
{
name = "Maps files fixer",
author = ".Rushaway",
description = "Downloads fixed files for multiples map",
version = "1.0.0",
url = ""
};

public void OnMapStart()
{
char sCurrentMap[256];
GetCurrentMap(sCurrentMap, sizeof(sCurrentMap));
if (strcmp(sCurrentMap, "ze_paranoid_rezurrection_v11_9", false) == 0)
{
ApplyParanoidFix();
ApplyGargantuaFix();
}
else if (strcmp(sCurrentMap, "ze_avalanche_reboot_beta7", false) == 0 || strcmp(sCurrentMap, "ze_l0v0l_v1_4", false) == 0 ||
strcmp(sCurrentMap, "ze_mountain_escape_v5_zy", false) == 0 || strcmp(sCurrentMap, "ze_Pidaras_v1_4fix3", false) == 0 ||
strcmp(sCurrentMap, "ze_sandstorm_css_v1_5x3", false) == 0 || strcmp(sCurrentMap, "ze_tyranny_v5fix", false) == 0)
{
ApplyGargantuaFix();
}
}

stock void ApplyParanoidFix()
{
AddFileToDownloadsTable("materials/rafuron/paranoid/new_bsod.vmt");
AddFileToDownloadsTable("materials/rafuron/paranoid/new_bsod.vtf");

AddFileToDownloadsTable("materials/rafuron/paranoid/new_bsod2.vmt");
AddFileToDownloadsTable("materials/rafuron/paranoid/new_bsod2.vtf");

AddFileToDownloadsTable("materials/models/lotr/singularity/decalmetalvent004a.vmt");

AddFileToDownloadsTable("materials/berke1/zombieescape1/paranoidrezurrection1/allitemsmode1.vmt");
AddFileToDownloadsTable("materials/berke1/zombieescape1/paranoidrezurrection1/allitemsmode1.vtf");
}

// See: https://github.com/Moltard/CSS-ZE-Configs/commit/28793dbfa52fbdcdddf4af3f5d6bdc13c0439ace
stock void ApplyGargantuaFix()
{
PrecacheModel("models/garg_fix_2025.mdl");

AddFileToDownloadsTable("materials/models/garg_fix_2025/garg_body.vmt");
AddFileToDownloadsTable("materials/models/garg_fix_2025/garg_body.vtf");
AddFileToDownloadsTable("materials/models/garg_fix_2025/garg_body_normal.vtf");
AddFileToDownloadsTable("materials/models/garg_fix_2025/garg_eye_Chrome.vmt");
AddFileToDownloadsTable("materials/models/garg_fix_2025/garg_eye_Chrome.vtf");

AddFileToDownloadsTable("models/garg_fix_2025.dx80.vtx");
AddFileToDownloadsTable("models/garg_fix_2025.dx90.vtx");
AddFileToDownloadsTable("models/garg_fix_2025.mdl");
AddFileToDownloadsTable("models/garg_fix_2025.phy");
AddFileToDownloadsTable("models/garg_fix_2025.sw.vtx");
AddFileToDownloadsTable("models/garg_fix_2025.vvd");
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
UnlitGeneric
{
$basetexture "berke1/zombieescape1/paranoidrezurrection1/allitemsmode1"
}
Binary file not shown.
24 changes: 24 additions & 0 deletions materials/models/garg_fix_2025/garg_body.vmt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
"VertexLitGeneric"
{
"$baseTexture" "models/garg_fix_2025/garg_body"
"$bumpmap" "models/garg_fix_2025/garg_body_normal"
// "$detail" "detail/detail_noise1"
"$detailscale" 2.5
"$surfaceprop" "alienflesh"
"$model" 1

// "$evnmapcontrast" "0.5"
"$envmap" "env_cubemap"
"$envmapcontrast" 1
"$envmapsaturation" 1
// "$envmaptint" "[.56 .67 .75]"
"$normalmapalphaenvmapmask" "1"

"VertexLitGeneric_DX9_hdr"
{
// put HDR override stuff here
"$envmaptint" "[ .39 .39 .62]"
}


}
Binary file added materials/models/garg_fix_2025/garg_body.vtf
Binary file not shown.
Binary file not shown.
19 changes: 19 additions & 0 deletions materials/models/garg_fix_2025/garg_eye_Chrome.vmt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"VertexLitGeneric"
{

"$envmap" "models/garg_fix_2025/garg_eye_Chrome"

"$envmapsphere" "1"

"$envmapmode" "1"

"$multipass" "1"

"$envmapsaturation" "0"

"$envmapcontrast" 1.1

"$surfaceprop" "alienflesh"

"$model" 1
}
Binary file not shown.
5 changes: 5 additions & 0 deletions materials/models/lotr/singularity/decalmetalvent004a.vmt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"VertexLitGeneric"
{
"$basetexture" "Decals/decalmetalvent004a"
"$selfillumtexture" "decals/decalmetalventmask004a"
}
6 changes: 6 additions & 0 deletions materials/rafuron/paranoid/new_bsod.vmt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"UnlitGeneric"
{
"$model" 1
"$basetexture" "Rafuron/Paranoid/new_bsod"
"$scale" "[1 1]"
}
Binary file added materials/rafuron/paranoid/new_bsod.vtf
Binary file not shown.
6 changes: 6 additions & 0 deletions materials/rafuron/paranoid/new_bsod2.vmt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"UnlitGeneric"
{
"$model" 1
"$basetexture" "Rafuron/Paranoid/new_bsod2"
"$scale" "[1 1]"
}
Binary file added materials/rafuron/paranoid/new_bsod2.vtf
Binary file not shown.
Binary file added models/garg_fix_2025.dx80.vtx
Binary file not shown.
Binary file added models/garg_fix_2025.dx90.vtx
Binary file not shown.
Binary file added models/garg_fix_2025.mdl
Binary file not shown.
Binary file added models/garg_fix_2025.phy
Binary file not shown.
Binary file added models/garg_fix_2025.sw.vtx
Binary file not shown.
Binary file added models/garg_fix_2025.vvd
Binary file not shown.
16 changes: 16 additions & 0 deletions sourceknight.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
project:
sourceknight: 0.2
name: FixMapsFiles
dependencies:
- name: sourcemod
type: tar
version: 1.11.0-git6934
location: https://sm.alliedmods.net/smdrop/1.11/sourcemod-1.11.0-git6934-linux.tar.gz
unpack:
- source: /addons
dest: /addons

root: /
output: /addons/sourcemod/plugins
targets:
- FixMapsFiles