4918 Commits

Author SHA1 Message Date
Javivi
0f23329206 Document magic numbers
No more magic
2017-02-20 17:46:01 +01:00
Javivi
386ce17738 Fixes for the docs
Fix some typos, shorten lines, document SOCK_ERROR_EINPROGRESS
2017-02-20 17:24:15 +01:00
Javivi
3c49064308 Fixs for the module
- Fixed the backwards compatibility with the return codes
- Merged socket_connect and socket_connect_nb
- Added a 5th parameter to socket_open that takes bit flags to enable
the new features (libc errors & nonblocking sockets)
- Fixed an error on socket_send2 that caused the buffet not to start
from the beginning if multiple calls were made
- Updated docs
- [docs] Prefixed error codes with SOCK_
- [docs] Added the new flags SOCK_NON_BLOCKING and SOCK_LIBC_ERRORS
- [docs] Added a new stock called SOCK_ERROR_EINPROGRESS(error) to be
used when checking if a newly created nonblocking socket is connecting
2016-04-02 22:06:10 +02:00
Javivi
9674e13cfb Update docs and fix AMBuild
Updated documentation following the guidelines
2015-10-12 00:32:56 +02:00
Javivi
533e858ab9 Module rewrite
- WinSock version changed from 1.1 to 2.2.
- Properly check for WinSock initialization on OnAmxxAttach/Detach.
- Now natives will not be added if we can't start up WinSock.
- socket_open() is now IP version agnostic (both IPv4 and IPv6 are
supported).
- Error reporting has been changed on socket_open(), a new parameter
called _libc_errors has been added, and, if enabled, libc errors will be
returned instead of the previous made-up errors.
- socket_close() now returns a value on success/failure.
- Added non-blocking sockets at socket_open_nb().
- Added socket_is_writable() to check if a socket is ready for write.
- Added socket_is_readable() as an alias to socket_change().
- Code rewritten to be more readable, it should be self-explaining now.
2015-10-11 23:20:23 +02:00
Vincent Herbet
915da57d32 Merge pull request #300 from Arkshine/fix/cstrike-sv
Fix retrieval of sv address not working under linux
2015-10-11 13:46:10 +02:00
Arkshine
b3e5e10473 Fix retrieval of sv address not working under linux 2015-10-11 13:25:31 +02:00
Vincent Herbet
2eeeb2997d Merge pull request #299 from Arkshine/fix/typos-in-fakemeta
Fix (get/set)_pdata_(int/float) using the wrong offset value (typo from #297)
2015-10-09 20:36:36 +02:00
Arkshine
9997c31703 Fix (get/set)_pdata_(int/float) using the wrong offset value (typo from #297) 2015-10-09 20:30:45 +02:00
Vincent Herbet
cae7281def Merge pull request #297 from Arkshine/fix/invalid-edict-on-last-player
Fix some natives relying on a known engine bug related to last player's edict being invalid
2015-10-08 19:52:27 +02:00
Arkshine
9bee1f7edf Consistency: Replace GETEDICT with HLTypeConversion in core 2015-10-08 19:36:42 +02:00
Arkshine
b65a0600ee Consistency: Replace GETEDICT and variants with HLTypeConversion in cstrike module 2015-10-08 19:25:00 +02:00
Arkshine
6f301b5cea Consistency: Replace GETEDICT, INDEXENT2 and others things with HLTypeConversion in hamsandwich module 2015-10-08 19:24:49 +02:00
Arkshine
bf5fdc2b5c Consistency: Replace GetPlayerEdict with HLTypeConversion in fun module 2015-10-07 23:27:58 +02:00
Arkshine
e52fc14114 Consistency: Replace INDEXENT2 with HLTypeConversion in engine module 2015-10-07 23:27:57 +02:00
Arkshine
429a4596c1 Consistency: Replace INDEXENT2 and others things with HLTypeConversion in fakemeta module 2015-10-07 23:27:56 +02:00
Arkshine
9980b7ac62 Fix some natives relying on a known engine bug related to last player's edict being invalid 2015-10-06 17:19:01 +02:00
Vincent Herbet
fd0f6cc429 Merge pull request #296 from Arkshine/feature/update-to-latest-amtl
Update to latest AMTL
2015-10-05 19:49:10 +02:00
Arkshine
c29eabec50 Fix max length inconsistencies + typo 2015-10-05 19:12:30 +02:00
Arkshine
138b9e1510 Remove UTIL_Format() and UTIL_VarArgs() 2015-10-05 19:12:08 +02:00
Arkshine
f22dc769f4 Replace some LibraySys usage with AMTL primitives 2015-10-02 23:22:22 +02:00
Arkshine
f976861e21 Fix AMBuild and VS projects files 2015-10-02 23:22:22 +02:00
Arkshine
2d910838a2 Fix AMTL internal paths 2015-10-02 23:22:21 +02:00
Arkshine
f811bab608 Update AMTL to latest revision 2015-10-02 23:22:20 +02:00
Vincent Herbet
9a4731dd14 Merge pull request #284 from Arkshine/feature/new-pdata-natives
Introduce new natives to read/write on entity's private data based off class/member name using gamedata files
2015-09-19 20:56:31 +02:00
Arkshine
16f65663dc Add new natives to read/write on entity's private data based off class/member name available from gamedata files 2015-09-19 20:07:48 +02:00
Vincent Herbet
ac2bcb2d19 Merge pull request #282 from Arkshine/gamedata-type-desc
Modify game config parser to support more offset data and reflect changes
2015-09-07 09:10:28 +02:00
Vincent Herbet
eaa330d745 Merge pull request #291 from alliedmodders/fix/native-overflow
Fix crash when dynamic native is executed with the max number of params
2015-09-05 18:24:51 +02:00
Vincent Herbet
b63e63cfcd Fix crash when dynamic native is executed with the max number of params
This fixes a buffer overflow with `g_Params`, which has a size of 16 but params index starts to 1. As consequence when 16 params are passed, `g_Params[16]` is indexed and likely overwrites something important which leads to a crash at some point.

It doesn't happen in 1.8.2. Possible reasons why it happens in dev version is this uses newer compiler and compiling optimization are better , resulting crash is triggered now. 

Reported here https://forums.alliedmods.net/showthread.php?t=271103.
2015-09-05 17:49:37 +02:00
Vincent Herbet
5b3a5a0153 Merge pull request #289 from alliedmodders/fix/typo-autoexeconfig
Fix typo in AutoExecConfig native
2015-09-05 08:49:04 +02:00
Vincent Herbet
57a5004f4e Fix typo
Related to #266. Looks like I've changed the prefix afterward at some point for some reason, but engine is retarded and with `plugin.something.cfg` it will understand extension is `something` instead  of `cfg` ; and will fail to execute as it's an invalid extension (only `cfg` and `rc` are allowed).
2015-09-05 08:42:31 +02:00
Vincent Herbet
190304f601 Merge pull request #288 from Arkshine/sync-amtl
Update AMTL submodule from upstream and reflect changes
2015-08-26 11:19:19 +02:00
Arkshine
0005d1a6b5 Update AMTL submodule from upstream and reflect changes 2015-08-26 11:15:07 +02:00
Vincent Herbet
224239f5a1 Merge pull request #266 from Arkshine/feature/autoexeccfg
Introduce automatic config file for plugins and two forwards
2015-08-26 10:42:59 +02:00
Arkshine
5b8bbddbc1 AutoExecConfig: Adjust few things 2015-08-26 10:38:31 +02:00
Vincent Herbet
c5d4eb49d4 Merge pull request #287 from Sylvert0/Fix-cs_set_user_team
Add a CS_NORESET constant for use with cs_set_user_team for skipping the model reset
2015-08-23 19:44:47 +02:00
Iván Lo Giudice
e4b635f5be Update CstrikeNatives.cpp 2015-08-22 17:54:00 -03:00
Iván Lo Giudice
f95f2032fc Update cstrike.inc 2015-08-22 17:51:48 -03:00
Arkshine
78b1154b8d AutoExecConfig: Do not traumatize Travis and Nextra 2015-08-14 16:38:29 +02:00
Arkshine
1f3ba35140 AutoExecConfig: Remove config code in admin.sma 2015-08-14 16:38:28 +02:00
Arkshine
1f3c7cf272 AutoExecConfig: Update documentation 2015-08-14 16:38:28 +02:00
Arkshine
9a1dc5d179 AutoExecConfig: Add AutoExecConfig native 2015-08-14 16:38:27 +02:00
Arkshine
f22185d646 AutoExecConfig: Enable the configs 2015-08-14 16:38:27 +02:00
Arkshine
517a08e134 AutoExecConfig: Add CoreConfig class + OnAutoConfigsBuffered / OnConfigsExecuted forwards 2015-08-14 16:37:48 +02:00
Vincent Herbet
a9b183612b Merge pull request #264 from Arkshine/fix/dropclient
Fix player not being internally disconnected in some situation and add client_disconnected forward
2015-08-14 00:22:57 +02:00
Arkshine
ed4faf7c11 Fix player not being internally disconnected in some situation + add client_disconnected forward 2015-08-14 00:08:50 +02:00
Vincent Herbet
a9015d1d84 Merge pull request #283 from alliedmodders/fix/newmenu-propnocolor
Fix MPROP_NOCOLORS menu property not working
2015-08-13 12:19:12 +02:00
Vincent Herbet
83a72a6e3a Fix MPROP_NOCOLORS menu property not working 2015-08-13 12:04:31 +02:00
Arkshine
5f0b92f7c3 Fix typos 2015-08-12 10:43:59 +02:00
Arkshine
c270243b56 Replace "time" type name by a more generic one "float" 2015-08-10 18:06:06 +02:00