public override void ServerSyncFixedUpdate()
    {
        base.ServerSyncFixedUpdate();

        if (ServerState.tickNumber % SawScript.numTicksPerHit == 0)
        {
            float ht = 0f;             // Not used
            ExplodeDetection.BlowUp(transform.position, transform.position, 100f * Time.fixedDeltaTime * SawScript.numTicksPerHit, GetComponent <SphereCollider> ().radius, 0.05f, 2f, null, ignoreTeam, ref ht, playerOwner);
        }
    }
Beispiel #2
0
    public virtual void BlowUp(Transform c)
    {
        GameObject exception = directHit(c);

        float healthTakenThrowaway = -1;

        ExplodeDetection.BlowUp(transform.position, transform.position, getExpDamage() * initDmgPercent, maxDist, leastDmgPercent / initDmgPercent,
                                knockBackMult, exception, ignoreTeam, ref healthTakenThrowaway, playerOwner);

        exists = false;
    }
Beispiel #3
0
    public override void ServerSyncFixedUpdate()
    {
        setSize(getLifeTimeServer());

        // This thing will murder traps in their sleep. 50 * 10 = 500 DPS, minimum of 200 DPS.
        if (ServerState.tickNumber % SawScript.numTicksPerHit == 0)
        {
            float NOT_HEALTH_TAKEN = -1;
            ExplodeDetection.BlowUp(transform.position, transform.position, 10f * SawScript.numTicksPerHit, transform.localScale.x * 2.5f, 0.40f, 0.70f, null, team, ref NOT_HEALTH_TAKEN, playerOwner);
        }
    }
Beispiel #4
0
    // This could be done in the same way bullets are done..

    // Server only:
    public void FireTakeHealth(Vector3 cameraForward)
    {
        // This comes from the gun, oddly enough:
        GameObject hB = (GameObject)MonoBehaviour.Instantiate(healingBlast, parentPlayerMove.mainCamera.transform.position + cameraForward * 2.8f, Quaternion.LookRotation(cameraForward)); // It gets made at the tip of the gun.

        hB.GetComponent <SyncGameState> ().playerOwner = parentPlayerMove.plyr;                                                                                                             // Redudant.. not used..

        OperationNetwork.OperationAddSyncState(hB);                                                                                                                                         // hB doesn't have any syncing properties beside position / rotation. (TODO implement)

        // Server also calculates the collision right here:

        // Note that HEALING #s are hard coded within BlowUp!
        ExplodeDetection.BlowUp(parentPlayerMove.mainCamera.transform.position + parentPlayerMove.mainCamera.transform.forward * 2.6f,          // Note how it heals in a different location!
                                parentPlayerMove.mainCamera.transform.position, 20f, 2.2f, 1f, 0.5f, parentPlayerMove.gameObject,
                                parentPlayerMove.GetComponent <Combat> ().team, ref healthTaken, parentPlayerMove.plyr);
    }