1. GSManager
    1. Funktionen
    2. Unterstützte Spiele
    3. Neuigkeiten
    4. Statistiken
    5. Serverliste
  2. Lexikon
  3. Filebase
  4. Entwicklung
  5. Forum
    1. Dashboard
    2. Unerledigte Themen
  6. Web-Interface
  7. Artikel
  8. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  • Anmelden
  • Registrieren
  • Suche
Dieses Thema
  • Alles
  • Dieses Thema
  • Dieses Forum
  • Artikel
  • Seiten
  • Dateien
  • Forum
  • Lexikon
  • Erweiterte Suche
  1. GSManager
  2. Forum
  3. Allgemeines
  4. Fehler

Bug found in SetNextMap

  • DFC-NightMare[NL]
  • 26. Juli 2009 um 12:05
Das Projekt GSManager (vormals ManuAdminMod) wurde am 01.01.2020 eingestellt - diese Internetpräsenz bleibt verfügbar, die Software wird aber nicht länger gepflegt. Vielen Dank für eure Unterstützung in den mehr als zehn vergangenen Jahren!
  • DFC-NightMare[NL]
    Anfänger
    Punkte
    20
    Beiträge
    2
    • 26. Juli 2009 um 12:05
    • #1

    Hi Guys,

    Each time that we use "!setnextmap mapname" the current "map rotation" gets reset.

    After playing "mapname" the rotation starts at the beginning instead of continue where it was.
    One could argu if this is wanted or not, aka a bug or not.

    I Found a fix for resetting the map rotation, I hope you like it:

    - Open the file called:mod.class.php

    - find this code:

    //=============================================================


    public function rconSetNextMap($map, $gametype) {
    $nextmap = "gametype " . $gametype . " map " . $map;
    $this->rconSetDvar("sv_maprotationcurrent", $nextmap);
    return true;
    }
    //=============================================================


    - replace it with this code:

    //=============================================================

    // sv_mapRotation is the list of maps and gametypes to play in the rotation.
    // The game does not touch it in anyway accept to read it once during a rotation.
    // sv_mapRotationCurrent is created by the game. It uses it internally to keep track of the current rotation.
    // Each time a map_rotation is called for, it looks at that string.
    // It strips the first map and map name from the head of that string and that is the map that it starts.
    // Notice that the sv_mapRotationCurrent string has been modified by the game. The string is now shorter.
    // When that string is finally empty after running thru the whole rotation,
    // the game then copies the contents of sv_mapRotation to sv_mapRotationCurrent (including the gametype specifiers) and the process starts again.
    public function rconGetCurrentMapRotation() {
    $return = $this->rconDvarList("sv_maprotation*");
    $current = $return["sv_maprotationcurrent"];
    return $current;
    }

    // Insert the "nextmap" before the current rotation sequence.
    // The rotation will continue as where it was after playing the "special inserted map"
    public function rconSetNextMap($map, $gametype) {
    $nextmap = "gametype " . $gametype . " map " . $map . " " . $this->rconGetCurrentMapRotation();
    $this->rconSetDvar("sv_maprotationcurrent", $nextmap);
    return true;
    }

    //=============================================================


    Restart the adminmod and your fixed.

    Each time that you Use "setnextmap" the map is inserted before the rest of the rotation.

    Therefor the rotation does not get reset each time that you use this command.


    I hope you like this fix/addon.


    Kind regards,


    DFC-NightMare[NL]

    http://www.dutchfightclub.nl

    Einmal editiert, zuletzt von DFC-NightMare[NL] (26. Juli 2009 um 12:18)

  • manu
    Meister
    Punkte
    10.835
    Trophäen
    3
    Beiträge
    2.113
    • 26. Juli 2009 um 14:02
    • #2

    Thank you very much!! Nice fix. Will add this to 0.10

Benutzer online in diesem Thema

  • 1 Besucher
  1. Mitarbeiter
  2. Datenschutzerklärung
  3. Nutzungsbedingungen
  4. Impressum
  5. Kontakt
Community-Software: WoltLab Suite™