Skip to content

Commit 5e003b9

Browse files
committed
Merge branch 'master' of https://github.com/MidLevel/MLAPI
2 parents 87dd855 + cdf2bf0 commit 5e003b9

File tree

5 files changed

+72
-6
lines changed

5 files changed

+72
-6
lines changed

MLAPI/MonoBehaviours/Core/NetworkedBehaviour.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ public abstract class NetworkedBehaviour : MonoBehaviour
4444
/// Gets wheter or not the object has a owner
4545
/// </summary>
4646
public bool isOwnedByServer => networkedObject.isOwnedByServer;
47+
/// <summary>
48+
/// Contains the sender of the currently executing RPC. Useful for the convenience RPC methods
49+
/// </summary>
50+
protected uint ExecutingRpcSender { get; private set; }
4751

4852
/// <summary>
4953
/// Gets the NetworkedObject that owns this NetworkedBehaviour instance
@@ -636,7 +640,9 @@ private void InvokeServerRPCLocal(ulong hash, uint senderClientId, Stream stream
636640

637641
if (rpc.reflectionMethod != null)
638642
{
643+
ExecutingRpcSender = senderClientId;
639644
rpc.reflectionMethod.Invoke(this, userStream);
645+
ExecutingRpcSender = 0;
640646
}
641647

642648
if (rpc.rpcDelegate != null)
@@ -649,7 +655,9 @@ private void InvokeServerRPCLocal(ulong hash, uint senderClientId, Stream stream
649655
{
650656
if (rpc.reflectionMethod != null)
651657
{
658+
ExecutingRpcSender = senderClientId;
652659
rpc.reflectionMethod.Invoke(this, stream);
660+
ExecutingRpcSender = 0;
653661
}
654662

655663
if (rpc.rpcDelegate != null)

docs/Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ DEPENDENCIES
8181
tzinfo-data
8282

8383
RUBY VERSION
84-
ruby 2.5.3p105
84+
ruby 2.5.1p57
8585

8686
BUNDLED WITH
8787
1.16.6

docs/_docs/getting-started/installation.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,26 @@ title: Installation
33
permalink: /wiki/installation/
44
---
55

6+
### Installer
67
To get started with the MLAPI. You need to install the library. The easiest way is to use the Editor installer. Simply download the MLAPI_Installer unity package from the [here](https://github.com/TwoTenPvP/MLAPI/releases). Then press window at the top of your editor and select MLAPI. Once in the MLAPI window, select the version you wish to use and press install.
8+
9+
710
![Video showing the install process](https://i.imgur.com/zN63DlJ.gif)
811

912

1013
Once imported into the Unity Engine, you will be able to use the components that it offers. To get started, you need a GameObject with the NetworkingManager component. Once you have that, use the Initializing the library articles to continue.
1114

1215

16+
### Files
17+
The MLAPI comes with 3 main components
18+
##### MLAPI.dll + IntXLib.dll
19+
These two DLL's are the runtime portion. The actual library. *IntXLib.dll is the BigInt library used for the ECDHE implementation*. These files are thus **required**.
20+
##### MLAPI-Editor.unitypackage
21+
This unitypackage includes the source files for all the Editor scripts. The UnityPackage will automatically place these source files in the Editor folder to avoid it being included in a build. **While the MLAPI will function without this, it is not designed to work without the editor part and is thus recommended for all users**.
22+
##### MLAPI-Installer.unitypackage
23+
This unitypackage includes the source file for the installer. This component is totally optional. The Installer can help you manage versions. If you don't want to use the installer, you can simply place the MLAPI.dll, IntXLib.dll and the Editor source files in your project and it will work just as well.
1324

1425

15-
**Important note**
1626

27+
### Important note
1728
_The wiki, API references, readme and other documentation like information is not updated on a per commit basis. They are being updated on a per release basis. Thus using in development features on the master branch is not discouraged but there might not be any documentation except the commit messages._

docs/_pages/features.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@
8383
</tr>
8484
<tr>
8585
<td>Custom Messages</td>
86+
<td><i class="fa fa-times" aria-hidden="true" style="color:red"></i></td>
8687
<td><i class="fa fa-check" aria-hidden="true" style="color:green"></i></td>
8788
<td><i class="fa fa-check" aria-hidden="true" style="color:green"></i></td>
88-
<td><i class="fa fa-times" aria-hidden="true" style="color:red"></i></td>
8989
</tr>
9090
<tr>
9191
<td>Per Client RPC</td>
@@ -163,7 +163,7 @@
163163
<td>SyncedEvent</td>
164164
<td><i class="fa fa-times" aria-hidden="true" style="color:red"></i></td>
165165
<td><i class="fa fa-check" aria-hidden="true" style="color:green"></i></td>
166-
<td><i class="fa fa-times" aria-hidden="true" style="color:red"></i></td>
166+
<td><i class="fa fa-check" aria-hidden="true" style="color:green"></i></td>
167167
</tr>
168168
<tr>
169169
<td>Unlimited Networked Vars</td>

docs/index.html

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,16 @@
22
layout: default
33
---
44

5-
<div class="container">
6-
5+
<div class="container text-center">
6+
<div class="row">
7+
<div class="col-sm-12">
8+
<div>
9+
<a href="{{ "/releases/" | prepend: site.git_address }}"><img src="https://img.shields.io/github/downloads/MidLevel/MLAPI/total.svg"></a>
10+
<a href="https://discord.gg/FM8SE9E"><img src="https://img.shields.io/discord/449263083769036810.svg"></a>
11+
<a href="https://ci.appveyor.com/project/MidLevel/mlapi/branch/master"><img src="https://ci.appveyor.com/api/projects/status/isxpxba8r76x7chu/branch/master?svg=true"></a>
12+
</div>
13+
</div>
14+
</div>
715
<div class="row">
816
<div class="col-md-12">
917
<h2 class="header-light regular-pad">What is the MLAPI?</h2>
@@ -17,4 +25,43 @@ <h2 class="header-light regular-pad">What is the MLAPI?</h2>
1725
</p>
1826
</div>
1927
</div>
28+
29+
<div class="row">
30+
<div class="col-md-6">
31+
<h2 class="header-light regular-pad">Why the MLAPI?</h2>
32+
33+
<p class="lead">The MLAPI is one of the oldest and most activley developed game networking
34+
library out there. As a direct result of this, it offers many more features than other libraries.
35+
A comparison between other libraries can be seen on the <a href="{{ "/features/" | prepend: site.baseurl }}">features</a>
36+
page. But in short, the MLAPI's focus is to make networking simple to let you focus on what matters for
37+
your game.
38+
</p>
39+
</div>
40+
41+
<div class="col-md-6">
42+
<h2 class="header-light regular-pad">Getting Started</h2>
43+
44+
<p class="lead">Want to get started with the MLAPI?
45+
The <a href="{{ "/wiki/" | prepend: site.baseurl }}">community wiki</a> is a great place to start!
46+
</p>
47+
</div>
48+
</div>
49+
50+
<div class="row">
51+
<div class="col-sm-6">
52+
<h1 class="text-center"><i class="fa fa-code" aria-hidden="true"></i></h1>
53+
<h3 class="text-center">Open Source</h3>
54+
<p>The MLAPI is completeley free and open source, this means that it comes with no hidden CCU's or
55+
other limitations. Just a great networking library for you to use.
56+
</p>
57+
</div>
58+
<div class="col-sm-6">
59+
<h1 class="text-center"><i class="fa fa-puzzle-piece" aria-hidden="true"></i></h1>
60+
<h3 class="text-center">General Purpose</h3>
61+
<p>The MLAPI is a general purpose networking library deisnged to work with any game.
62+
High-performance, large scale games as well as small co-op games. Dedicated server applications
63+
or player hosted? The MLAPI does it all.
64+
</p>
65+
</div>
66+
</div>
2067
</div>

0 commit comments

Comments
 (0)