Skip to content
Snippets Groups Projects
Commit f4c0d442 authored by deuce's avatar deuce
Browse files

Fix duplicate lock bug

parent c4a95fb5
Branches
Tags
No related merge requests found
...@@ -849,7 +849,7 @@ function DropFighters() ...@@ -849,7 +849,7 @@ function DropFighters()
newf=9999; newf=9999;
newf=InputFunc([{min:0,max:newf}]); newf=InputFunc([{min:0,max:newf}]);
db.lock(Settings.DB,'sectors.'+player.Sector,LOCK_WRITE); db.lock(Settings.DB,'sectors.'+player.Sector,LOCK_WRITE);
sector=db.read(Settings.DB,'sectors.'+player.Sector,LOCK_READ); sector=db.read(Settings.DB,'sectors.'+player.Sector);
if(sector.Fighters > 0 && sector.FighterOwner != player.Record) { if(sector.Fighters > 0 && sector.FighterOwner != player.Record) {
console.writeln("There are already fighters in this sector!"); console.writeln("There are already fighters in this sector!");
db.unlock(Settings.DB,'sectors.'+player.Sector); db.unlock(Settings.DB,'sectors.'+player.Sector);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment