open.mp 服务器
托管你自己的《侠盗猎车手:圣安地列斯》多人联机服务器。
v1.6.7.3218最新
亮点
- 新增 NPC 车辆位置与旋转相关原生函数,并改进 NPC 车辆的移动表现
- 修复封禁重载、连接、广播与服务器关闭等网络问题
- 修复 Pawn、组件与 C API 相关问题,并支持 Conan 2 与 macOS ARM 构建
查看完整更新日志
变更内容(自 v1.5.8.3079 起)
服务器运行与网络
- 新增
artwork.show_crc_logs配置项,可在需要时开启 TXD 与 DFF 文件的 CRC 日志记录;该选项默认关闭。#1164 - 修复了服务器配置中的环境变量替换问题,数值型与布尔型配置项也不例外。#1195
- 修复了
reloadbans:重新载入的封禁现在会重新由网络层执行,命中的在线玩家也会一并被移除。#1276 - 修复了踢出玩家后误报“服务器已满”的问题,拒绝无效的连接丢失(connection lost)数据包,并对无效的连接尝试施以临时封禁,以减少日志刷屏。#1209, #1173
- 修复了服务器刚启动时发起的连接因无效的网络 cookie 而被拒绝的问题。#1213
- 修复了插件在发送前读取广播 RPC 载荷时该载荷被截短的问题,此问题会影响天气切换、消息发送与游戏文本等功能。#1215
- 修复了 Linux 服务器在无终端环境下(例如通过
nohup运行)关闭时卡死或崩溃的问题。#1203 - 车辆重生时现在会重置喷漆(paintjob)。#1213
脚本与组件
- 修复了 Pawn
format()中%q的转义问题、以字符串方式读取不存在的控制台变量时的崩溃,以及由非法SetTimerEx参数引发的崩溃。#1159, #1171, #1223 - 修复了退出观战模式后无法重生的问题,并让
TogglePlayerSpectating能可靠地重新开启观战。#1187, #1092 - 调整了主脚本的卸载流程:组件现在会在脚本卸载完成后再行重置,避免回调与计时器仍引用已卸载的脚本。#1190
- 为未指定文件名便调用脚本加载类控制台命令的情况补充了用法提示,并为缺失旧版插件的情况给出了更明确的错误信息。#1032, #1273
- 新增了对物体与附着物体编辑状态的独立校验,并会依据当前生效的编辑模式校验客户端返回的编辑结果。#1188
- 修复了
AttachPlayerObjectToObject(含其 C API 调用路径)忽略syncRotation参数的问题。#1163 - 修复了 C API 中销毁帮派区域(gang zone)与拾取物(pickup)时未释放其旧版 ID、导致这些 ID 无法复用的问题。#1231
- 更新了 Pawn,修复其对打包字符串(packed string)执行
memcpy与fwrite的问题,并修正了旧版服务器端游戏文本组件中的预设值。#1180
NPC 相关改进
- 新增
NPC_SetVehiclePos、NPC_SetVehicleRot、NPC_GetVehiclePos与NPC_GetVehicleRot原生函数。行为变更:NPC_SetPos现在会将 NPC 从所在车辆中移出;若要在 NPC 乘坐时调整其位置,请改用车辆专用函数。#1182, #1237 - 修复了 NPC 车辆在坡道上行驶时显得扁平或出现瞬移的问题,并改进了车辆移动的同步。#1249, #1280
- 修复了
NPC_PutInVehicle将 NPC 放入船只后,其外观仍停留在徒步状态的问题。#1236 - 修复了已死亡的 NPC 在流式加载(stream in)时仍呈站立姿态的问题;
NPC_Respawn现在会清除其死亡状态。#1238, #1184 - 修复了未调用
NPC_SetAmmo时 NPC 弹药无限的问题,修正了NPC_GetSkin的返回值,并修复了NPC_SetAngleToPos计算出的角度。#1165, #1182, #1252 - 改进了 NPC 在路径节点间距较短时的移动表现,并避免零时长(zero-time)的节点切换在同一 tick 内反复执行。移动逻辑调整、切换次数限制
- 修复了 NPC 的清理流程,以及可选组件缺失或正在卸载时的若干崩溃问题。#1175, #1182
构建与部署
- 构建系统迁移至 Conan 2,并新增了面向 Windows、Linux 与 macOS 的专门构建指南。#1233, #998
- 新增 macOS ARM 构建支持,并修复了在新版微软工具链下的 Windows 兼容性问题。#1234, #1235, #1166
- 修复了 32 位 Docker 运行镜像缺少启动
omp-server所需库文件的问题。#1263
按合并的拉取请求整理的更新日志
- Restore Artwork CRC logs by @SimoSbara in https://github.com/openmultiplayer/open.mp/pull/1164
- fix microsoft's shitty ABI compat breakage by @AmyrAhmady in https://github.com/openmultiplayer/open.mp/pull/1166
- Fix string escape with %q in format() by @SimoSbara in https://github.com/openmultiplayer/open.mp/pull/1159
- Fix GetConsoleVarAsString crash by @ksenonadv in https://github.com/openmultiplayer/open.mp/pull/1171
- Ignore networked ID_CONNECTION_LOST packet. by @ksenonadv in https://github.com/openmultiplayer/open.mp/pull/1173
- Fix NPC component cleanup by @vincenzocorso in https://github.com/openmultiplayer/open.mp/pull/1175
- Fix issues with NPCs by @SimoSbara in https://github.com/openmultiplayer/open.mp/pull/1165
- NPC_Respawn now resets death state to false by @stley in https://github.com/openmultiplayer/open.mp/pull/1184
- Call components reset after finishing unloading the main script. by @ksenonadv in https://github.com/openmultiplayer/open.mp/pull/1190
- Fix spawn when leaving spectator state by @ksenonadv in https://github.com/openmultiplayer/open.mp/pull/1187
- NPC changes and fixes by @AmyrAhmady in https://github.com/openmultiplayer/open.mp/pull/1182
- Patch to fix env vars by @itsneufox in https://github.com/openmultiplayer/open.mp/pull/1195
- Fix Linux server deadlock on shutdown without TTY by @TanF12 in https://github.com/openmultiplayer/open.mp/pull/1203
- Fix server-full issue introduced by Kick changes by @ksenonadv in https://github.com/openmultiplayer/open.mp/pull/1209
- Fix RPC call to use correct bit count for data transmission by @bssth in https://github.com/openmultiplayer/open.mp/pull/1215
- Tweaks for pawn component and more by @NexiusTailer in https://github.com/openmultiplayer/open.mp/pull/1180
- CAPI: Fix legacy slots not being released for GZ and Pickups by @markski1 in https://github.com/openmultiplayer/open.mp/pull/1231
- Fix server crash for invalid SetTimerEx args by @ksenonadv in https://github.com/openmultiplayer/open.mp/pull/1223
- conan 2 (remembered mj goat today) by @AmyrAhmady in https://github.com/openmultiplayer/open.mp/pull/1233
- Some more fixes for macOS by @NexiusTailer in https://github.com/openmultiplayer/open.mp/pull/1235
- macos fix, add macos ci, fix conan cache for conan 2 by @AmyrAhmady in https://github.com/openmultiplayer/open.mp/pull/1234
- Add help message when attempting to load a script without arguments by @xerox8521 in https://github.com/openmultiplayer/open.mp/pull/1032
- Fix syncRotation ignored to AttachPlayerObjectToObject by @SimoSbara in https://github.com/openmultiplayer/open.mp/pull/1163
- Fix NPC_SetAngleToPos(): use
{vec.x, vec.y}instead of{vec.x, vec.z}by @KW46 in https://github.com/openmultiplayer/open.mp/pull/1252 - docker/run.sh: fix omp-server failing to start due to missing libraries by @vincenzocorso in https://github.com/openmultiplayer/open.mp/pull/1263
- Fix moving NPC vehicle pitch not synced by @Fanorisky in https://github.com/openmultiplayer/open.mp/pull/1249
- fix: NPC_PutInVehicle not visually attaching NPC to boat seat by @Revelts in https://github.com/openmultiplayer/open.mp/pull/1236
- Reset vehicle paintjob on respawn and seed cookies after network start by @berkleblebiciii in https://github.com/openmultiplayer/open.mp/pull/1213
- Fix dead NPC appearing standing when streamed in by @krzysztofmotas in https://github.com/openmultiplayer/open.mp/pull/1238
- Core: re-apply bans to networks in reloadBans by @berkleblebiciii in https://github.com/openmultiplayer/open.mp/pull/1276
- add linux build instructions to README.md by @aszarth in https://github.com/openmultiplayer/open.mp/pull/998
- Fixed: TogglePlayerSpectating by @uifdev in https://github.com/openmultiplayer/open.mp/pull/1092
- fix misleading message for missing legacy plugins by @dockfries in https://github.com/openmultiplayer/open.mp/pull/1273
- Fix NPC teleporting on slopes while driving by @itsneufox in https://github.com/openmultiplayer/open.mp/pull/1280
- Add NPC_GetVehiclePos and NPC_GetVehicleRot natives by @Revelts in https://github.com/openmultiplayer/open.mp/pull/1237
- Object editing types by @xunder-matth in https://github.com/openmultiplayer/open.mp/pull/1188
新贡献者
- @SimoSbara 在 https://github.com/openmultiplayer/open.mp/pull/1164 首次贡献
- @vincenzocorso 在 https://github.com/openmultiplayer/open.mp/pull/1175 首次贡献
- @stley 在 https://github.com/openmultiplayer/open.mp/pull/1184 首次贡献
- @TanF12 在 https://github.com/openmultiplayer/open.mp/pull/1203 首次贡献
- @bssth 在 https://github.com/openmultiplayer/open.mp/pull/1215 首次贡献
- @markski1 在 https://github.com/openmultiplayer/open.mp/pull/1231 首次贡献
- @xerox8521 在 https://github.com/openmultiplayer/open.mp/pull/1032 首次贡献
- @KW46 在 https://github.com/openmultiplayer/open.mp/pull/1252 首次贡献
- @Fanorisky 在 https://github.com/openmultiplayer/open.mp/pull/1249 首次贡献
- @Revelts 在 https://github.com/openmultiplayer/open.mp/pull/1236 首次贡献
- @berkleblebiciii 在 https://github.com/openmultiplayer/open.mp/pull/1213 首次贡献
- @krzysztofmotas 在 https://github.com/openmultiplayer/open.mp/pull/1238 首次贡献
- @aszarth 在 https://github.com/openmultiplayer/open.mp/pull/998 首次贡献
- @dockfries 在 https://github.com/openmultiplayer/open.mp/pull/1273 首次贡献
完整更新日志:https://github.com/openmultiplayer/open.mp/compare/v1.5.8.3079...v1.6.7.3218
* DynSSL 版本要求你的 Linux 发行版中已安装 libssl。
v1.5.8.3079
亮点
- 内置的、完全可由服务器控制的NPC(非玩家角色)功能
- 新增C API / C API SDK,并增强了Pawn与SDK之间的互操作性
- 通过更强的同步验证检查,实现了显著的网络性能提升
- 升级至OpenSSL 3.0.13
查看完整更新日志
变更内容
核心功能
- 引入了作为内置服务器功能的完全可控NPC,无需外部NPC插件,从而实现更深层的服务器端AI和自动化。
- 新增了C API和C API SDK,允许开发者将open.mp直接与原生代码和外部工具集成。
- 新增了从open.mp C++ SDK调用Pawn原生函数的能力,显著提升了脚本与原生模块之间的互操作性。
网络与性能
- 实现了显著的网络性能提升,带来了更快的同步和更流畅的游戏体验。
- 添加了多项同步验证检查,以防止无效数据、欺骗性的状态和畸形的网络数据包。
- 现在会根据客户端版本的最大允许值来验证MTU(最大传输单元),防止配置错误和系统不稳定。
平台与兼容性
- 将OpenSSL从1.1.1升级至3.0.13,正式弃用了对旧版Linux发行版的支持,确保了对现代系统的妥善支持。
- 为
config.json添加了环境变量支持,使容器化部署、CI/CD流程和生产环境部署更加灵活方便。
NPC与游戏性改进
- NPC的ID分配现在采用从高到低的顺序,防止冲突并提高可预测性。
- 弃用了
ConnectNPC函数,推荐使用新的内置NPC系统。 - 强制火车在创建时使用4个连续的ID,修复了长期存在的游戏不一致性问题。
- 修复了火车乘客的同步问题。
稳定性与错误修复
- 修复了一个关于重生数据的棘手问题。
- 修复了与踢出玩家相关的延迟问题。
- 修复了在服务器重启期间检查列表中与游戏区域相关的崩溃问题。
- 修复了玩家在观战后状态被随机设置为
None的问题。 - 修复了Linux服务器关闭时
stdin被锁定的问题。 - 修复了
chatlogging配置变量不影响死亡信息的问题。 - 移除了旧的Fixes组件,因其不稳定、冗余且功能已被新系统取代。
- 针对Pawn原生函数进行了多次小修复,提高了正确性和可用性。
文档与社区
- 新的和更新的NPC脚本API(Pawn原生函数) 已在官方文档中提供:https://open.mp/docs
- 加入社区并在Discord上获取支持:https://discord.gg/samp
- 通过OpenCollective支持开发:https://opencollective.com/openmultiplayer
- 官方网站:https://open.mp/
按合并的拉取请求整理的更新日志
- Fix for non-bullet guns returned as 0 in weapon data by @NexiusTailer in https://github.com/openmultiplayer/open.mp/pull/1046
- Update gitignore for CLion && macOS by @povargek in https://github.com/openmultiplayer/open.mp/pull/1049
- fix ci by @AmyrAhmady in https://github.com/openmultiplayer/open.mp/pull/1054
- Fix apple silicon build by @AmyrAhmady in https://github.com/openmultiplayer/open.mp/pull/1062
- Fixes for a couple of issues by @NexiusTailer in https://github.com/openmultiplayer/open.mp/pull/999
- Fixed: legacy config variable 'chatlogging' does not control death logging by @uifdev in https://github.com/openmultiplayer/open.mp/pull/1057
- Pack Vehicle and StreamInVehicle more tightly by @PTemuri in https://github.com/openmultiplayer/open.mp/pull/1091
- Fixed: train passenger sync by @uifdev in https://github.com/openmultiplayer/open.mp/pull/1100
- Fixed
logging.log_connection_messagesoption check by @Northn in https://github.com/openmultiplayer/open.mp/pull/1094 - Fixed "reverse search for NPC id in player pool" by @NoPressF in https://github.com/openmultiplayer/open.mp/pull/1088
- Return string length for some natives by @NexiusTailer in https://github.com/openmultiplayer/open.mp/pull/1098
- Check provided mtu value against max allowed per client version by @ksenonadv in https://github.com/openmultiplayer/open.mp/pull/1111
- Reverse search for NPC id in player pool by @ksenonadv in https://github.com/openmultiplayer/open.mp/pull/1075
- add NPC_HasPathPointInRadius by @NoPressF in https://github.com/openmultiplayer/open.mp/pull/1115
- One big beautiful pull request by @NexiusTailer in https://github.com/openmultiplayer/open.mp/pull/1113
- Create FUNDING.yml by @AmyrAhmady in https://github.com/openmultiplayer/open.mp/pull/1121
- Store natives globally & ability to call them from using SDK by @AmyrAhmady in https://github.com/openmultiplayer/open.mp/pull/1128
- fix sdtin lock from getline when shutting down by @AmyrAhmady in https://github.com/openmultiplayer/open.mp/pull/1131
- NPC Component by @AmyrAhmady in https://github.com/openmultiplayer/open.mp/pull/916
- Update FCNPC deprecation message by @NexiusTailer in https://github.com/openmultiplayer/open.mp/pull/1132
- add capi component and submodule by @AmyrAhmady in https://github.com/openmultiplayer/open.mp/pull/1125
- Some fixes and changes by @AmyrAhmady in https://github.com/openmultiplayer/open.mp/pull/1133
- upgrade openssl version from 1.1.1 to 3.0.13 by @AmyrAhmady in https://github.com/openmultiplayer/open.mp/pull/1096
- Some NPC fixes and changes by @AmyrAhmady in https://github.com/openmultiplayer/open.mp/pull/1135
- Add trams where they are missed by @NexiusTailer in https://github.com/openmultiplayer/open.mp/pull/1140
- Force train to be 4 consecutive ids by @AmyrAhmady in https://github.com/openmultiplayer/open.mp/pull/1139
- Fix event handling by @0x617374726F in https://github.com/openmultiplayer/open.mp/pull/1144
- Use entry create for dialog data creation by @AmyrAhmady in https://github.com/openmultiplayer/open.mp/pull/1145
- Add environment variable support in config.json by @itsneufox in https://github.com/openmultiplayer/open.mp/pull/1142
- network, npcs, and docker script changes by @AmyrAhmady in https://github.com/openmultiplayer/open.mp/pull/1148
- fix TextDraw_SetProportional by @AmyrAhmady in https://github.com/openmultiplayer/open.mp/pull/1149
- fix slot reserving for players outside of raknet by @AmyrAhmady in https://github.com/openmultiplayer/open.mp/pull/1150
- Fix Kick Issue by @Tiaansu in https://github.com/openmultiplayer/open.mp/pull/1151
- fix: clear checkingList when component is reseted by @nidi21 in https://github.com/openmultiplayer/open.mp/pull/1152
- bump version by @AmyrAhmady in https://github.com/openmultiplayer/open.mp/pull/1153
- update sdk module to the right ref by @AmyrAhmady in https://github.com/openmultiplayer/open.mp/pull/1154
- Couple of fixes for NPC component by @NexiusTailer in https://github.com/openmultiplayer/open.mp/pull/1156
- Fix for random occurrence of player state none by @NexiusTailer in https://github.com/openmultiplayer/open.mp/pull/1146
新贡献者
- @povargek 在 https://github.com/openmultiplayer/open.mp/pull/1049 首次贡献
- @PTemuri 在 https://github.com/openmultiplayer/open.mp/pull/1091 首次贡献
- @Northn 在 https://github.com/openmultiplayer/open.mp/pull/1094 首次贡献
- @NoPressF 在 https://github.com/openmultiplayer/open.mp/pull/1088 首次贡献
- @0x617374726F 在 https://github.com/openmultiplayer/open.mp/pull/1144 首次贡献
- @itsneufox 在 https://github.com/openmultiplayer/open.mp/pull/1142 首次贡献
- @Tiaansu 在 https://github.com/openmultiplayer/open.mp/pull/1151 首次贡献
- @nidi21 在 https://github.com/openmultiplayer/open.mp/pull/1152 首次贡献
完整更新日志:https://github.com/openmultiplayer/open.mp/compare/v1.4.0.2779...v1.5.8.3079
* DynSSL 版本要求你的 Linux 发行版中已安装 libssl。
所有发布均为开源。从源代码编译,或直接从 GitHub 下载。