Comments (4)
All seem fixed after replacing the func by this one:
_timerStuck()
{
if (!isDefined(game["maprestarts"]))
{
game["maprestarts"] = 0;
}
for(;;)
{
wait 60;
players = getEntArray("player", "classname");
if (players.size == 0)
{
emptymap = codam\utils::getVar("scr_mm", "emptymap", "string", 0, "");
if (emptymap != "")
{
if (emptymap == level.mmmapname)
{
if (game["maprestarts"] > 7)
{
[[level.gtd_call]]("map_restart", false);
}
else
{
game["maprestarts"]++;
[[level.gtd_call]]("map_restart", true);
}
}
else
{
setCvar("sv_mapRotationCurrent", "gametype " + level.mmgametype + " map " + emptymap);
wait 1;
level.mapended = true;
game["state"] = "intermission";
level notify("intermission");
[[level.gtd_call]]("exitLevel", false);
}
}
else
{
if (game["maprestarts"] > 7)
{
level notify("end_map");
}
else
{
game["maprestarts"]++;
[[ level.gtd_call ]]("map_restart", true);
}
}
}
else
{
if (game["maprestarts"] != 0)
{
game["maprestarts"] = 0;
}
}
}
}
from codam_miscmod.
Hi, when an issue is solved for you it doesn't mean it's solved for MiscMod. This issue I presume is only when you run server with developer 1
, as bdz
said he tested this and it was without issue, maybe he did not test it fully.
Can you test the following (similar to yours) code with developer 1
for inclusion into MiscMod?
_timerStuck() // tip by Jona
{
if(!isDefined(game["maprestarts"]))
game["maprestarts"] = 0;
for(;;) {
wait 60;
players = getEntArray("player", "classname");
if(players.size == 0) {
emptymap = codam\utils::getVar("scr_mm", "emptymap", "string", 0, "");
if(emptymap != "") {
if(emptymap != level.mmmapname) {
setCvar("sv_mapRotationCurrent", "gametype " + level.mmgametype + " map " + emptymap);
wait 1;
level.mapended = true;
game["state"] = "intermission";
level notify("intermission");
[[ level.gtd_call ]]("exitLevel", false);
} else
[[ level.gtd_call ]]("map_restart", false);
} else {
if(game["maprestarts"] > 7) {
level notify("end_map"); // idea is to just rotate the map
return;
}
game["maprestarts"]++;
[[ level.gtd_call ]]("map_restart", true); // true playerinfo retained
}
} else {
if(game["maprestarts"] != 0)
game["maprestarts"] = 0;
}
}
}
from codam_miscmod.
I would now let you close issues I opened even if I think I posted a fix
After replacing the code I posted by yours:
-started server with developer 1
, joined game
-rotated to an other map, disconnected client
After about 1 minute, the server rotated to the scr_mm_emptymap
I did not notice any issue/error message
Thank you
from codam_miscmod.
Thanks for testing. Commit: 7231751.
If you want to submit code to MiscMod you need to follow the STYLE guide:
https://github.com/cato-a/CoDaM_MiscMod/blob/main/STYLE.md
from codam_miscmod.
Related Issues (13)
- UNLOCALIZED() / WARNING: Could not translate part of hudelem string: "" HOT 1
- No scores/mapvote at the end of some custom maps HOT 3
- Sometimes the server crash (at the end of map I think) HOT 1
- "scr_mm_nnn" does not apply HOT 5
- "replay this map" doesn't indicate gametype HOT 11
- Only the first custom command appears HOT 2
- Showdown winner not getting rewarded HOT 2
- Mutual kill is prevented HOT 1
- developer "1" + no mm_user + send message = crash HOT 3
- Can we allow !rs command access for everyone in public? HOT 3
- `!mute` doesn't work with the libcod branch HOT 3
- libcod branch: `_loadBans()` not loading all bans
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codam_miscmod.