New patches: [DraftPlacementMod Rich Hansen **20070911004905 Modified draft.c to position players in pool and pick columns by assigned pool position and selection count respectively. Added p_inl_pool_sequence to struct.h ] { hunk ./Vanilla/include/struct.h 508 + int p_inl_pool_sequence; /* Position in the player pool */ hunk ./Vanilla/ntserv/draft.c 160 - /* Not sure how we can position independly of player number - There's going to be two ugly holes where the captains would be - May need to assign a new variable - */ - j->p_inl_x = x - xoffset + j->p_no * (xoffset / 14); + + /* Place in pool; inl_pool_sequence initialized in inl_draft_begin() */ + j->p_inl_x = x - xoffset + j->inl_pool_sequence * (xoffset / 14); hunk ./Vanilla/ntserv/draft.c 171 - int offset_x = ( GWIDTH / 5 ) / 2; /* half of tactical */ - int offset_y = ( GWIDTH / 5 ) / 6; - if (j->p_team == FED) { y += offset_y; } - if (j->p_team == ROM) { y -= offset_y; } - /* TODO: position independently of player number */ - j->p_inl_x = x + offset_x - j->p_no * (offset_x / 18) ; - j->p_inl_y = y; + + if (inl_draft_style == INL_DRAFT_STYLE_LEFT_TO_RIGHT) { + int offset_x = ( GWIDTH / 5 ) / 2; /* half of tactical */ + int offset_y = ( GWIDTH / 5 ) / 6; + if (j->p_team == FED) { y += offset_y; } + if (j->p_team == ROM) { y -= offset_y; } + + + /* TODO: position independently of player number */ + j->p_inl_x = x + offset_x - j->p_no * (offset_x / 18) ; + j->p_inl_y = y; + } + + if (inl_draft_style == INL_DRAFT_STYLE_BOTTOM_TO_TOP) { + /* Magic numbers set in inl_draft_pick() + 0-99 are pool places + 100-199 are home picks + 200-299 are away picks + */ + if (j->p_inl_pick_sequence > 200) { /* Away pick */ + int xoffset = (( GWIDTH / 5 ) / 4) + ((( GWIDTH / 5) / 10) * ((j->p_inl_pick_sequence - 200) / 3)); + int yoffset = (( GWIDTH / 5 ) / 4) + ((( GWIDTH / 5) / 10) * ((j->p_inl_pick_sequence - 200) % 3)); + } + else if (j->p_inl_pick_sequence > 100) { /* Home pick */ + int xoffset = (( GWIDTH / 5 ) / 4) - ((( GWIDTH / 5) / 10) * ((j->p_inl_pick_sequence - 100) / 3)); + int yoffset = (( GWIDTH / 5 ) / 4) + ((( GWIDTH / 5) / 10) * ((j->p_inl_pick_sequence - 100) % 3)); + } + else { /* ERROR */ + int xoffset = 0; + int yoffset = 0; + } + + j->p_inl_x = x + xoffset; + j->p_inl_y = y + yoffset; + } + + hunk ./Vanilla/ntserv/draft.c 242 + int poolPositionCount = 0; hunk ./Vanilla/ntserv/draft.c 249 + if (!j->p_inl_captain) /* Captains don't need a pool position */ + { + j->p_inl_pool_sequence = poolPositionCount; /*Initialize position in pool*/ + poolPositionCount++; + /* TODO: Handle ships who join mid-draft-- give a poolPosition somehow */ + } hunk ./Vanilla/ntserv/draft.c 349 + /* TODO: Assign newcomer a pool position */ hunk ./Vanilla/ntserv/draft.c 356 + /* Face the way your going-- let's try spinning instead hunk ./Vanilla/ntserv/draft.c 360 + */ + /* Spin the ship (hopefully) */ + j->p_dir = ((u_char) nint((j->p_dir + 1) % 128)); hunk ./Vanilla/ntserv/draft.c 397 - + static int homePickCount = 0; + static int awayPickCount = 0; + hunk ./Vanilla/ntserv/draft.c 403 + + /* Set pick selection number */ + /* Could probably find a cleaner way to do this */ + if (j->p_team == FED) + { + j->p_inl_pick_sequence = 100 + homePickCount; + homePickCount++; + } + else if (j->p_team == ROM) + { + j->p_inl_pick_sequence = 200 + awayPickCount; + awayPickCount++; + } + else /* ERROR */ + { + /* TODO: Add Error Code */ + } + } Context: [inl draft, through to completion quozl@us.netrek.org**20070910114731 * ntserv/draft.c, tests/inl-draft: this is a working implementation that has yet to have the decorations and final positioning done by Rich. A few things remain to be tested. ] [do_message, usable now from daemon, ntserv and tools quozl@us.netrek.org**20070910082345 * ntserv/smessage.c: remove direct external reference to message_flag and change to a run-time configurable callback. * tools/message.c: demonstrate how tools can avoid having their own message injector. * ntserv/main.c, ntserv/daemonII.c: adopt the new message_flag usage. * ntserv/draft.c: add messages to draft sequence. ] [daemon, indent message_flag function quozl@us.netrek.org**20070910074618] [inl draft, test script quozl@us.netrek.org**20070910065819] [inl, add test script quozl@us.netrek.org**20070910065118 * tools/message.c: add a forge-to-self mode for sending commands to the INL robot on behalf of a player. * tests/inl: add a test sequence outline for running an INL robot moderated game. ] [setship, add support to change player to observer and back quozl@us.netrek.org**20070910041635 Testing an idea for INL draft, if all potential players join the game as players, is it practical to have them be selected for observer or player, even though they are already in the game as a player? Seems so. This test results in the expected outcome. To proceed with the idea would need more slots in the player queue for INL servers though. ] [build environment setup documentation quozl@us.netrek.org**20070909235441] [inl draft, use change_team quozl@us.netrek.org**20070909054845] [xtkill, use new change_team function quozl@us.netrek.org**20070909054731] [inl draft, merge with rich, add documentation quozl@us.netrek.org**20070909050231 * ntserv/util.c: new function is_invisible_due_idle() since we are overloading is_idle() safety but want ships to be visible, * tools/setgame.c: add a way to initiate a draft without captains. * tools/setship.c: add a way to monitor p_inl_* variables and to change a slot draft state. ] [inl draft, pick order, pick delegation quozl@us.netrek.org**20070909021705] [mdPlayerCapnPositioning Rich Hansen **20070908162423 Modified Player and Captain positioning. Beginning to think we will need another structure to place picks according to selection number. ] [mdvote Rich Hansen **20070908141658 Modifications to inlcomm.c and inldefs.h to allow for voting on a minidraft, and to suspend start of game while a minidraft is underway. ] [add debian virtual appliance instructions quozl@us.netrek.org**20070908115213] [inl draft, animation and pick logic quozl@us.netrek.org**20070907131402] [replace p_inlcaptain with p_inl_captain quozl@us.netrek.org**20070907104405] [inl draft, restrict navigation and add hooks quozl@us.netrek.org**20070907072124] [fix formatting and return syntax quozl@us.netrek.org**20070907072037] [inl draft, add task specific sources quozl@us.netrek.org**20070907072004] [inl draft, add structures and constants quozl@us.netrek.org**20070907071942] [use hex values for gameup flags quozl@us.netrek.org**20070907071910] [Properly enforce mutes Karthik Arumugham **20070812194806 ip.c: Enforce mutes by setting mute rather than :ita'ing all slots. This allows proper administrative muting by IP address. ] [fix players v segfault quozl@us.netrek.org**20070820010313] [sysdef, comment spacing quozl@us.netrek.org**20070820010219] [fix ntserv core dump on messages sent by whitelist ip quozl@us.netrek.org**20070808002248 ntserv would die if a message was sent by a slot that was whitelisted, because p_no was called with a player number that was not valid, and the resulting pointer dereference was off with the fairies. ] [Surrender message wording Karthik Arumugham **20070807142620 ntscmds.c: Make the surrender warning wording more logical. ] [Warn about broken stats in end_tourney.pl Karthik Arumugham **20070803150332 end_tourney.pl: Planet stats have been broken for quite a while. Add a warning to the user in pwstats.html to that effect. ] [surrender detail, and struct teams prefix change quozl@us.netrek.org**20070807131651 Feature requested by Niclas Fredriks on 2007-07-19, change to mention surrender more frequently in last five minutes, and provide seconds as well as minutes on TIME command. ] [review, indentation, spacing, formatting quozl@us.netrek.org**20070801040656] [server to server advertising test code quozl@us.netrek.org**20070801034000 Implementation of server to server advertising, sending messages to all players when it would be useful to concentrate players on one server over another. Test code so far, no actual functionality yet apart from the test message. ] [docs, add REPORT_USERS option to CUSTOMIZATION John R. Dennison **20070722063614 Add REPORT_USERS option description to the CUSTOMIZATION file. ] [Round packet loss on transmission to client Karthik Arumugham **20070709204253 ping.c: Packet loss was being truncated rather than rounded, causing, for example, 0.9% to turn into 0%. ] [Report packet loss to 1 decimal place Karthik Arumugham **20070709201850 Store packet loss as a double, and report to 1 decimal place when pinging a slot. ] [Help target change Karthik Arumugham **20070709200850 roboshar.c: Sending help to yourself results in better help output than from the robots. ] [docs, document required change to docs/CUSTOMIZATION John R. Dennison **20070709072414] [allow whitelist to override ignores John R. Dennison **20070705201307 Allow whitelisted IP's to override player :ita settings. Rational is that whitelist entries are supposed to have a higher level of trust granted by the server administrator and as such should be allowed to send messages to players that have them :ita'd. This patch allows for adminsitrator set override levels for each of the 3 message classifications with all levels defaulting to non-permissable override status. ] [fix compilation warning, is_idle quozl@us.netrek.org**20070703124425] [pret, plasma reset fix John R. Dennison **20070627082253 When the winning condition is matched kathy resets kill on all player slots. Previous plasma was removed from all players regardless of ship type. This patch will not remove plasma from a base. ] [Remove . for playercounts of home/away teams Karthik Arumugham **20070624183505 solicit.c: This changes "home." and "away." to "home" and "away" for player count purposes. This is to allow hostnames like "home-observer.clue.netrek.org" for an observer port, but still report the regular home queue count on the metaserver. ] [robots, ignore commands fix John R. Dennison **20070621171321 Previous patch prevented config file to be parsed and processed if the BOTS_IGNORE_COMMANDS define was set. This patch properly handles restricting user and stdin commands from being processed if the admin desires while allowing all pre-configured commands to be processed. ] [sysdef, 80 col fix John R. Dennison **20070620050821 Text description extended past 80 columns. ] [Compile with base-practice, newbie, and pre-T off Karthik Arumugham **20070619152552 genspkt.c, util.c: The server would not compile if base practice, newbie server mode, and pre T mode were all #defined to be off. ] [pret, display proper win condition John R. Dennison **20070618161003 Change to win condition writeup in explanatory text overlooked during push of configurable win condition; this patch addresses that. ] [Add PRETKEEPALIVE define Karthik Arumugham **20070618154850] [CPPFLAGS fixes Karthik Arumugham **20070618135323 Correctly read CPPFLAGS in various Makefile.ins. This enables properly configuring with a given CPPFLAGS environment variable. ] [pret, save galaxy/saved galaxy lifetime sysdef configurable John R. Dennison **20070615065424 Adds the ability of having pre-t galaxy save/restore and saved galaxy lifetime configurable via sysdef. ] [security fix, fix padding of feature packet quozl@us.netrek.org**20070626092517] [add further py-structs quozl@us.netrek.org**20070626092500] [review reformatting quozl@us.netrek.org**20070626092423] [security fix, information leak quozl@us.netrek.org**20070625083705 * ntserv/genspkt.c: SP_MOTD packets had unintended data after the terminating NUL character, from other packets or other stack usage. ] [Check against null variables in ban_noconnect check williamb@its.caltech.edu**20070618023752 * main.c: Debug of ntserv.core indicated ban_noconnect was calling bans_check_permanent with a blank login name and NULL host. Did not check as to where these variables are set during the login sequence, only fixed the statement to make sure they exist before going further. M ./Vanilla/ntserv/main.c -5 +7 ] [further py-struct adjustments quozl@us.netrek.org**20070614220449] [pret, sysdef configurable win condition John R. Dennison **20070614213905 The pre-t mode win condition is now configurable via sysdef's PRET_PLANETS parameter. This is the number of planets a team must be up by in order to win a round of pre-t entertainment. ] [docs, add missing server mode writeups John R. Dennison **20070614211944 Add writeups for PRET, PRET_GUEST, HOCKEY, INL. Change writeups for other non-standard server modes. ] [add CLASSICTOURN writeup John R. Dennison **20070614210515 CLASSICTOURN description missing from docs/CUSTOMIZATION; this patch adds the writeup. ] [robots can ignore commands John R. Dennison **20070614204157 To prevent potential abuse the newbie and pre-t bots can have their command processors disabled. The default is to allow commands; to disable follow steps in docs/CUSTOMIZATION. ] [Allow pre-T dropping on your own homeworld Karthik Arumugham **20070613201422 interface.c: Code did not allow you to drop your own homeworld. This lets you drop a homeworld if you own it (which will always be the case in pre-T mode.) ] [pret, pret mode status fix John R. Dennison **20070613200626 If kathy kicks all bots out after all humans leave and another human joins and bots get restarted pret mode is not properly set; this patch forces status->gameup to reflect pret mode any time a bot enters the game. ] [64-bit server fixes for 32-bit player/globals Karthik Arumugham **20070613000550 ltd_stats.h, struct.h: Pack some structs so that a playerfile and globals file created on a 32-bit machine work on a 64-bit Linux machine. ] [BUGS/PROJECTS updates williamb@its.caltech.edu**20070607102258] [pret, saved galaxy expiration John R. Dennison **20070607095411 Adds saved galaxy lifetime / expiration. Galaxy will be restored if tmode starts up again within PT_GALAXY_LIFETIME seconds. PT_GALAXY_LIFETIME is defined within pretdefs.h. Planned enhancement is to have galaxy save and restore functionality and galaxy lifetime configurable via sysdef. ] [sysdefaults.h gum entries Karthik Arumugham **20070606211722] [Robot manager move, update sysdefaults williamb@its.caltech.edu**20070606154034 * This patch makes all robot manager processes aware of changes to the system defaults file (sysdef). Needed primarily to allow robot debug output and level to change without having to restart the robot manager, but it could have other uses as well. M ./Vanilla/robots/basep.c +1 M ./Vanilla/robots/inl.c +2 M ./Vanilla/robots/marsmove.c +2 M ./Vanilla/robots/newbie.c +1 M ./Vanilla/robots/pret.c +1 M ./Vanilla/robots/puckmove.c +1 ] [Move robot debugging to sysdef williamb@its.caltech.edu**20070606152258 * Both newbie and pret used static unwieldy variables to generate debug output to a specified slot. This has been rewritten into global sysdef variables (robot_debug_target and robot_debug_level) to allow debugging to be turned on/off realtime. Still TODO: make newbie and pret (or any robot manager process) aware of changes to sysdef as it is updated during a game. M ./Vanilla/docs/sample_sysdef.in +7 M ./Vanilla/include/data.h +2 M ./Vanilla/include/sysdefaults.h +5 M ./Vanilla/ntserv/data.c +2 M ./Vanilla/robots/newbie.c -20 +19 M ./Vanilla/robots/pret.c -18 +17 ] [Newstartd deny, pass IP address williamb@its.caltech.edu**20070606100207] [Newbie.c, start_a_robot, typo fix, add more debug output williamb@its.caltech.edu**20070606095427] [Minor spacing fix, comment for ip free duplicates williamb@its.caltech.edu**20070606095340] [Newbie stop_a_robot, logic fix williamb@its.caltech.edu**20070606091730 * Added robot count to the debug output for stop_a_robot routine. * Fixed logic to first check total slot count (humans + robots), and if uneven, stop robot from the team with the most slots. Fixes bug where all robots could wind up on one team. M ./Vanilla/robots/newbie.c -16 +17 ] [free_duplicate_ips, don't free if pid 0 williamb@its.caltech.edu**20070606091624] [DENY_DUPLICATES, free processes with same ip williamb@its.caltech.edu**20070605235239] [Logic fix for metaserver player count/queue display Karthik Arumugham **20070605184737 slotmaint.c: Option for slots_playing() to count teamless (entering) slots. solicit.c: Don't report a queue even if the game is full if there are 4 or more teamless slots (those entering the game). This will stop bad metaserver queue counts when the server is full but has many slots stuck on entering. ] [Sysdef option, DENY_DUPLICATES williamb@its.caltech.edu**20070605075349 * Replaces the check in findslot (which didn't work) with one that denies the IP as soon as duplicates is exceeded, rather than waiting for 10 slots. Default to off, as it's only purpose at the moment is to deal with DOS attacks, which are rare. M ./Vanilla/docs/sample_sysdef.in +4 M ./Vanilla/include/data.h +1 M ./Vanilla/include/sysdefaults.h -1 +3 M ./Vanilla/ntserv/data.c +1 M ./Vanilla/ntserv/findslot.c -5 +8 ] [Add newbie queues to duplicates check williamb@its.caltech.edu**20070605074128] [Timercide tournamentMask() fix Karthik Arumugham **20070605082005 getentry.c: Fix the bug that let players rejoin on the team that was just timercided, which let them easily defend the neut from the winning team. ] [Reset the T Mode galaxy after a Pre-T victory Karthik Arumugham **20070605073052] [add protocol state description quozl@us.netrek.org**20070612082639] [further py-struct annotation, move CP_PLANET quozl@us.netrek.org**20070612080909 * packets.h: move CP_PLANET to a position in the source file consistent with the packet number. ] [further py-struct annotation quozl@us.netrek.org**20070612034057] [further py-struct annotation quozl@us.netrek.org**20070606065457] [new feature, get server version script quozl@us.netrek.org**20070605085526] [move ip deny set to better place quozl@us.netrek.org**20070605060916] [Add ip_deny_set to header williamb@its.caltech.edu**20070605055034] [denial of service protection, excess duplicates quozl@us.netrek.org**20070605011554 * findslot.c: if the number of duplicates exceeds 20 for a particular address, it is automatically added to the denied parties list used by netrekd, with the result that further connections will be closed. Administrator will need to periodically clean out the deny/ directory, with the date of last access being significant in their decision-making. * ip.c: add support for access to the netrekd deny/ directory. ] [Fix slot count for metaserver solicit, review quozl@us.netrek.org**20070605010419 * slotmaint.c: remove older code used by code that was removed, simplify comment, removing redundant information about caller. ] [change checksafe to is_idle quozl@us.netrek.org**20070605010059] [Fix slot count for metaserver solicit Karthik Arumugham **20070605003709 slotmaint.c: Slots were being reported that weren't on a team yet. Also, INL player counts were significantly skewed. Fix both bugs with better counting logic. ] [relax message restrictions for whitelisted entries John R. Dennison **20070601194511 Relax message restrictions on number of messages allowed in a short period of time by players that are whitelisted. Whitelisted entries are assumed to be players with a higher level of trust; this will allow such players to more easily send out help macros for new users. ] [Remove undeclared time_in_pre_T in pret.c Karthik Arumugham **20070603170906] [Save T-mode Galaxy Karthik Arumugham **20070603031745 pret.c: Modified patch from jrd to save and restore the T-mode galaxy when transitioning from T to pre-T and back to T. A timer should be added to reset the galaxy on T if pre-T has been going on for a while. (10 mins?) This keeps short interruptions in T-mode from resetting the galaxy. ] [Mask fix on genocided teams Karthik Arumugham **20070603031042 getentry.c: Removed logic to make coupable teams after geno selectable. ] [SYSDEF to require offense for higher ranks Karthik Arumugham **20070603030657 Enabling the OFFENSE_RANK sysdef will result in rank offense requirements. Commodore == 1.0, Rear Admiral == 1.2, Admiral == 1.4 Removed support for defense requirements in the process. ] [Prevent homeworld dropping in pre-T Karthik Arumugham **20070601185608 interface.c: People have been taking homeworlds in pre-T mode, which interferes with safe idling. This prevents them from doing so. ] [Don't set alert status due to idle ships Karthik Arumugham **20070531202902] [Foreign spelling Karthik Arumugham **20070531194214 Foreign was spelled as "foriegn" in an irritating number of places. ] [pret, fix potential reset during t-mode John R. Dennison **20070530030007 Fix a potential problem of a game being "won" via kathy during a real t-mode game; this was seen on pickled and it caused a lot of confusion and anger. ] [tournamentMask() fixes Karthik Arumugham **20070529144051 getentry.c: Be more intelligent on post-geno team masks. Also, keep all teams masked on pre-T entry until Kathy frees a slot. ] [pret, introductory text John R. Dennison **20070528221222 Add descriptive messages sent to All to explain what is going on in pre-t mode. ] [review, change global names quozl@us.netrek.org**20070528044858 Enforced global names to match sysdef names, fix indenting and wrap of new code. ] [Add CLASSICTOURN gum reminder line John R. Dennison **20070527153232 CLASSICTOURN reminder line to add support for it to gum missing; this patch adds it. ] [Add CLASSICTOURN sysdef entry John R. Dennison **20070527152923 Previous patch that added CLASSICTOURN functionality to emulate old-style tournamentMask() behaviour did not include the sysdef.in entry; this patch corrects that oversight. ] [Correct sysdef.in 3RD_DROP setting John R. Dennison **20070527073858 Distributed sysdef.in file does not have 3RD space dropping disabled by default which I believe is an oversight. This patche corrects this issue. ] [Configure user count reporting to metaservers John R. Dennison **20070527064434 Enable configurable reporting of user counts to the metaservers via a sysdef option. This is useful on bot servers such as base-practice. ] [Add CLASSICTOURN sysdef to emulate old tournamentMask() Karthik Arumugham **20070526002842 Emulate the old behavior of tournamentMask() by removing the restrictions on joining a diagonal race if 2 players are present on the opposing diagonal, and remove the logic not allowing teams to grow past 4 humans before T mode starts. ] [Rewrite of tournamentMask() Karthik Arumugham **20070525215047 getentry.c: tournamentMask() was an example of horrid, unmaintainable server code. This is a cleaner, clearer, and commented rewrite of it. ] [Observer bust army-drop fix Karthik Arumugham **20070524155558 cluecheck.c, daemonII.c: Use the PFOBSERV flag instead of POBSERV as there are still occasional cases of a dead observer saving armies. ] [remove is_observer quozl@us.netrek.org**20070523064045 Remove the is_observer macro. Macros whose sole purpose is to access flags of the same name do not add value to the code, and previous such macros were removed. Functions which encapsulate unusual aspects of a check, such as is_robot(), remain acceptable, but beg the question as to why we don't change the flags themselves. ] [review 1, indentation quozl@us.netrek.org**20070523063937] [Pre-T Idle Mode updates Karthik Arumugham **20070522173619 daemonII.c, genspkt.c, phaser.c: Let enemy weapons pass through idle ships. Also, don't display idle ships on the galactic. This will lessen confusion to newbies. It also has the nice side effect of making Pre-T bots ignore idle ships, as they perceive those ships to be off the galactic. ] [Changes to IP hide/whitelist behavior Karthik Arumugham **20070522161239 The behavior of hide and whitelist was inconsistent. This affects hosts that are in etc/ip/hide and etc/ip/whitelist. Now hidden hosts will show as from localhost, as before, but they will also now not show RSA failures. Whitelisted hosts will no longer show as hidden. Currently, whitelist only stops the RSA failure message and bypasses observer muting. A host now needs to be in etc/ip/hide as well to be hidden. Hiding a host also exempts it from proxy information display. ] [Pre-T entry reset fix, obliterate plasma/torps fix Karthik Arumugham **20070518203534 pret.c: Don't reset planets on Pre T robot entry if we're already in T mode. Minor patch to always reset torps and plasmas on an obliterate() call; this should fix an occasional stuck ship bug. ] [Show lack of RSA if SHOW_RSA is enabled Karthik Arumugham **20070518182241 redraw.c: Print the "not using RSA" message if SHOW_RSA is on, the client does not pass RSA, but CONFIRM is set to 0. Previously this message was only printed if a client was in the bypass file. ] [Exclamatory WARMONGER Karthik Arumugham **20070518180554 defs.h: WARMONGER was one character too long, causing the ! at the end of the relevent T-mode-starting message to get cut off. ] [Obliterate option to reset ship Karthik Arumugham **20070518165110 pret.c: Let obliterate be called in such a way to not fully reset a ship. Added by popular demand due to losing kills on start of T mode. pretdefs.h: Minor change to increase ROBOEXITWAIT. ] [Count bots in pre T for tournmask and bot entry team Karthik Arumugham **20070518164928 getentry.c, util.c, pret.c: Bots were not being counted towards team numbers in pre T. This caused bots to sometimes end up on 3rd race teams. ] [Increase UDP buffer size williamb@its.caltech.edu**20070512010048 * socket.c: With full weapon resolution on, it is not uncommon to exceed 758 bytes in UDP packet size sent to observers due to each torp taking 20 bytes. Since packet size was exceeded, the next update was skipped, causing choppiness during situations where multiple torps were in play. Upping the buffer size should help alleviate this problem. M ./Vanilla/ntserv/socket.c -1 +1 ] [Additional PFOBSERV code Karthik Arumugham **20070510233656 daemonII.c, util.c: Use PFOBSERV to fix the long-standing bug of a dead observer counting towards T mode. Also don't count them in realNumShips() which is used to count players in various places. main.c: Set the PFOBSERV bit earlier to prevent an occasional race condition causing momentary T mode when an observer joins. ] [Make use of PFOBSERV flag Karthik Arumugham **20070510230413 Let's make use of PFOBSERV to do something useful, like make pre-T bots not exit when an observer is joining and PDEAD. Added a generic is_observer() macro that checks PFOBSERV, and the server now properly sets the PFOBSERV bit when joining on an obs queue. ] [Pre-T bug fixes and queue logic change Karthik Arumugham **20070510223216 pret.c: Set GU_PRET when pre-T mode is restarted. defs.h, struct.h, queue.c, solicit.c: Get rid of all pre-T queues except for the pre-T daemon queue. They are not used. ] [Change INL_log and ltd_dump to non-compressed format williamb@its.caltech.edu**20070513212837 * Compression of these small files is not necessary, and only causes end user problems due to things like Internet Explorer 7 not handling .gz files correctly. Instead, INL_log is now renamed to a .txt file so it can be opened directly by any browser. The files are still sent in .tar.gz format to the central archive, the code that handles the receipt and display of these files is, to my knowledge, not public. I would strongly recommend the person who maintains the auto-archive receipt code to list INL_log and ltd_dump_txt in a non-compressed format. M ./Vanilla/robots/end_tourney.pl -4 +4 ] [Keep cambot file extension as .pkt williamb@its.caltech.edu**20070513211324] [SP_FLAGS_ALL, observer case williamb@its.caltech.edu**20070513193851 * The function updateFlagsAll will send abbreviated flags info to client for every slot. In the case of observers, it was telling client that the observer was dead. This bug was noticed indirectly as tractor/pressors were no longer being drawn for observers, and investigation into the problem linked it to observer's p_status, as set by the client function new_flags which handles SP_FLAGS_ALL packets. Thus, observer slots are now treated as PALIVE for purposes of updateFlagsAll. A possible improvement would be to only treat self observer slot as PALIVE and other observer slots as PDEAD. M ./Vanilla/ntserv/genspkt.c +1 ] [bugs reported during a game quozl@us.netrek.org**20070515091439] [Don't kill robots on geno Karthik Arumugham **20070506231219 conquer.c: Killing robots on geno made Kathy go into POUTFIT and do strange things like continuously destroy all torps. ] [Fix default LOCALSTATEDIR Karthik Arumugham **20070506175102 getpath.c: LOCALSTATEDIR was being set to LIBDIR instead after the recent getpath.c changes if you did not have it set in your environment variables. ] [pret, fixed at-war status during kathy termination John R. Dennison **20070506165130 During kathy termination via cleanup() all ships were declared to be at-war with everyone; this patch addresses that issue. ] [UpdateFlagsAll bug fix, match offset to what client expects williamb@its.caltech.edu**20070503131541 * Packet offset was mistakenly set to 16, when it should be 1 to indicate that it is sending slots 16-31 (this his how it is done for short packets flag handling). The for loop was modified to take this into account. Also, players was changed from being incremented directly to &players[i], as the starting slot for the flags packet is not necessarily the first entry in players struct. M ./Vanilla/ntserv/genspkt.c -5 +6 ] [updateFlagsAll, pass offset, support high player slots numbers williamb@its.caltech.edu**20070502214358 * Changed updateFlagsAll so that the starting slot # for the packet is passed to the function instead of assumed to be 0. * Bug fix to the loop, j should always start at 0, it's merely a bit offset counter. * Send a 2nd SP_FLAGS_ALL packet if the highest active slot is greater than 15 (mirroring check in sendVPlayers function). M ./Vanilla/ntserv/genspkt.c -9 +15 ] [Xtkill, lower player's shields williamb@its.caltech.edu**20070502214259 * Added option 'd' for lowering player's shields. M ./Vanilla/tools/xtkill.c +4 ] [setgalaxy, removal of non-INL galaxy reset, cleanup John R. Dennison **20070506052816 Removed non-INL galaxy reset / resource generation; standardized usage of MAXPLANETS in all applicable locations. The deprecated 'r' reset option is still supported for backward-compatibility of any existing scripts that may call it although it will now do INL-style resource generation. ] [pret, prevent kathy from exiting John R. Dennison **20070505171358 It had been observed that kathy would quit out with no humans in the game for 60 seconds and would not respawn until the daemon died and restarted; this patch addresses that issue. player bots will still exit out as they should. toggling of PRET=1 to PRET=0 in sysdef still causes player bots and kathy to exit cleanly. ] [pret, remove references to PRET queues John R. Dennison **20070503191238 Remove all references to PRET queues. This appears to be legacy code from when this robot was copied from newbie and is not required for proper operation. This resolves the problem of pickup queues not being visible during real-t mode operation and supercedes the previous fix for this issue. ] [Fix very minor IP_CHECK_DNS typo in sysdef patch Karthik Arumugham **20070502153217] [Move IP_CHECK_DNS* to sysdef williamb@its.caltech.edu**20070501075203 * Moved the 2 IP_CHECK_DNS options to sysdef, defaults are the same as before. Impetus for change was reverse host lookup is broken on warped's box, so this option was causing problems. Included some minor formatting changes for consistency. M ./Vanilla/docs/sample_sysdef.in +8 M ./Vanilla/include/config.h.in -10 M ./Vanilla/include/data.h +2 M ./Vanilla/include/sysdefaults.h +5 M ./Vanilla/ntserv/data.c +3 M ./Vanilla/ntserv/enter.c -11 +6 M ./Vanilla/ntserv/ip.c -6 +2 M ./Vanilla/ntserv/ntscmds.c -4 +2 ] [virtual servers, environment variables quozl@us.netrek.org**20070501083428 * getpath.c: new feature, accept directories from environment variables. Bug fix: limit file name path length to allocated space. * openmem.c: change from NETREK_PKEY to PKEY for the shared memory key environment variable. Bug fix: use PKEY also as a semaphore set identifier. * INSTALL: new feature, document how to set up virtual servers using the same binaries. * INSTALL.INL: minor fixes. Impact negligible unless you are using the NETREK_PKEY environment variable already. Change your scripts to use PKEY. ] [Allow robots to exit if server is dead williamb@its.caltech.edu**20070430072738 * robotd/redraw.c: Changes intrupt() to break out of readFromServer() loop if server is dead, otherwise a robot could cycle endlessly waiting for a server response. Change is consistent with other uses of readFromServer (see findslot.c or getname.c in the robotd directory). M ./Vanilla/robotd/redraw.c +3 ] [pret, fixed queue status during real-t transition John R. Dennison **20070430201821 Fixed queue report status during transition from pre-t to real-t. queue and queue hosts were showing pre-t queues even during real-t mode. ] [Re-add crypt.h under linux Karthik Arumugham **20070430144126 * db.c: Modern linuxes on 64-bit systems need crypt.h defined. If anyone has a better way to detect 64-bit Linuxes (add a configure test perhaps?), please add it. Otherwise, this does not hurt under 32-bit Linux distros. Failure to define this on Debian etch on AMD64 results in the server segfaulting on a crypt() call. ] [Remove crypt.h williamb@its.caltech.edu**20070430072404 * db.c: crypt.h is not in BSD, and the include is unnecessary given existing INC_UNISTD. M ./Vanilla/ntserv/db.c -1 ] [crypt, isolate to db.c, remove include in getname quozl@us.netrek.org**20070501013236 db.h was created during development, but eventually it folded back into proto.h where it was already. I missed undoing the change to getname.c. ] [Remove INL_RESOURCES John R. Dennison **20070430055125 As per a discussion in #netrek references to INL_RESOURCES have been removed and resource generation is now done explicitly by INL rules. ] [Remove Dynix parallel compile refs John R. Dennison **20070430054614 Remove legacy Dynix parallel compile references from ntserv/Makefile.in ] [Player stats update, prevent counter overflow williamb@its.caltech.edu**20070428081349 * Player stats are sent if repCount (internal update counter) has increased sufficiently, however it is safer to use modulo division rather than subtraction, thus the check was changed to be consistent with other uses of repCount in the code. M ./Vanilla/ntserv/genspkt.c -3 +1 ] [Bug fix, full direction resolution, cloak/shield flags williamb@its.caltech.edu**20070427033050 * A patch added as part of sp_flags_all implementation removed the constant sending of all player flags in sndFlags() for clients using F_full_direction_resolution. However, these flags are masked out in updateShips() and thus are never being sent. This patch doesn't mask those flags if F_full_direction_resolution is set but F_flags_all is *not* set, because in that case, the client is relying on sndFlags() for these flags, as they are not sent every update. M ./Vanilla/ntserv/genspkt.c -4 +7 ] [INL start armies changed from 17 to 12 Karthik Arumugham **20070426023134 * inl.c: The standard has been 12 armies for quite some time. Let's make it easier on the captains. ] [Add Heiko's Short packets writeup to README.SHORT williamb@its.caltech.edu**20070426043359] [Full weapon resolution, reduce bandwidth use williamb@its.caltech.edu**20070425125711 * This patch changes F_full_weapon_resolution so that a player only uses long packets for self torps, as these are the only torps the player can benefit from seeing beyond the 500x500 pixel short packet window. Other player's torps are not sent beyond this window regardless, so there is no need to use the long packet format for those torps. Patch does not change how observers receive torps with F_full_weapon_ resolution - they still use long packets for all torps. Expected bandwidth savings is 15 bytes per update times number of enemy torps on screen. M ./Vanilla/ntserv/genspkt.c -1 +9 M ./Vanilla/ntserv/socket.c -1 +3 ] [Add full weapon resolution exception to UDP packet size check williamb@its.caltech.edu**20070425063322 * The packet size checks in socket.c should also be ignored if F_full_weapon_resolution is enabled, as this quickly increases packet size beyond the threshholds (size of a single torp packet goes from 5 to 20 bytes). M ./Vanilla/ntserv/socket.c -2 +4 ] [Clarify SP_FLAGS_ALL in sample_features williamb@its.caltech.edu**20070425061550] [ip duplicates, create configuration directory entry quozl@us.netrek.org**20070425092720] [ultrix, remove support quozl@us.netrek.org**20070425091823 There are no active Netrek servers running on Ultrix. Ultrix is long dead. There is a volunteer to keep an Ultrix port active, but they don't have their hardware yet. ] [crypt, isolate to db.c quozl@us.netrek.org**20070425091607 So as to get rid of warnings about crypt(3), the use of it has been isolated to db.c. Note that this is an untested change with high potential for disruption, since it may render all old characters inaccessible. Needs careful testing. ] [compiler warnings, fix anzac 1 quozl@us.netrek.org**20070425091353] [TAG tagged 2007-04-25 build test quozl@us.netrek.org**20070425032946] Patch bundle hash: 9dbca40e363c820112be98067bcc3f01cd71f4df