]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - svvm_cmds.c
fix all the () problems, and make gcc warn for them
[xonotic/darkplaces.git] / svvm_cmds.c
index 324082b5925cae853277128a839e8eae782c26dc..6fde46d70d4d12cfb3932908a4696077596402dc 100644 (file)
@@ -71,6 +71,7 @@ char *vm_sv_extensions =
 "DP_QC_EDICT_NUM "
 "DP_QC_ENTITYDATA "
 "DP_QC_ETOS "
+"DP_QC_EXTRESPONSEPACKET "
 "DP_QC_FINDCHAIN "
 "DP_QC_FINDCHAIN_TOFIELD "
 "DP_QC_FINDCHAINFLAGS "
@@ -84,6 +85,7 @@ char *vm_sv_extensions =
 "DP_QC_GETTAGINFO "
 "DP_QC_GETTAGINFO_BONEPROPERTIES "
 "DP_QC_GETTIME "
+"DP_QC_GETTIME_CDTRACK "
 "DP_QC_MINMAXBOUND "
 "DP_QC_MULTIPLETEMPSTRINGS "
 "DP_QC_NUM_FOR_EDICT "
@@ -119,6 +121,7 @@ char *vm_sv_extensions =
 "DP_SOLIDCORPSE "
 "DP_SPRITE32 "
 "DP_SV_BOTCLIENT "
+"DP_SV_BOUNCEFACTOR "
 "DP_SV_CLIENTCOLORS "
 "DP_SV_CLIENTNAME "
 "DP_SV_CMD "
@@ -2612,7 +2615,7 @@ void SV_GetEntityMatrix (prvm_edict_t *ent, matrix4x4_t *out, qboolean viewmatri
 {
        prvm_eval_t *val;
        float scale;
-       float pitchsign;
+       float pitchsign = 1;
        int modelindex;
        dp_model_t *model;
 
@@ -2625,7 +2628,6 @@ void SV_GetEntityMatrix (prvm_edict_t *ent, matrix4x4_t *out, qboolean viewmatri
                Matrix4x4_CreateFromQuakeEntity(out, ent->fields.server->origin[0], ent->fields.server->origin[1], ent->fields.server->origin[2] + ent->fields.server->view_ofs[2], ent->fields.server->v_angle[0], ent->fields.server->v_angle[1], ent->fields.server->v_angle[2], scale * cl_viewmodel_scale.value);
        else
        {
-               pitchsign = 1;
                if (
                        ((modelindex = (int)ent->fields.server->modelindex) >= 1 && modelindex < MAX_MODELS && (model = sv.models[(int)ent->fields.server->modelindex]))
                        ?
@@ -2688,7 +2690,7 @@ int SV_GetTagMatrix (matrix4x4_t *out, prvm_edict_t *ent, int tagindex)
                return 2;
 
        modelindex = (int)ent->fields.server->modelindex;
-       if (modelindex <= 0 || modelindex > MAX_MODELS)
+       if (modelindex <= 0 || modelindex >= MAX_MODELS)
                return 3;
 
        model = sv.models[modelindex];
@@ -2780,7 +2782,7 @@ static void VM_SV_gettagindex (void)
 
        modelindex = (int)ent->fields.server->modelindex;
        tag_index = 0;
-       if (modelindex <= 0 || modelindex > MAX_MODELS)
+       if (modelindex <= 0 || modelindex >= MAX_MODELS)
                Con_DPrintf("gettagindex(entity #%i): null or non-precached model\n", PRVM_NUM_FOR_EDICT(ent));
        else
        {
@@ -2790,7 +2792,7 @@ static void VM_SV_gettagindex (void)
                                Con_Printf("gettagindex(entity #%i): tag \"%s\" not found\n", PRVM_NUM_FOR_EDICT(ent), tag_name);
        }
        PRVM_G_FLOAT(OFS_RETURN) = tag_index;
-};
+}
 
 //vector(entity ent, float tagindex) gettaginfo;
 static void VM_SV_gettaginfo (void)
@@ -2947,7 +2949,7 @@ static void VM_SV_setmodelindex (void)
                return;
        }
        i = (int)PRVM_G_FLOAT(OFS_PARM1);
-       if (i <= 0 || i > MAX_MODELS)
+       if (i <= 0 || i >= MAX_MODELS)
        {
                VM_Warning("setmodelindex: invalid modelindex\n");
                return;
@@ -2983,7 +2985,7 @@ static void VM_SV_modelnameforindex (void)
        PRVM_G_INT(OFS_RETURN) = OFS_NULL;
 
        i = (int)PRVM_G_FLOAT(OFS_PARM0);
-       if (i <= 0 || i > MAX_MODELS)
+       if (i <= 0 || i >= MAX_MODELS)
        {
                VM_Warning("modelnameforindex: invalid modelindex\n");
                return;
@@ -3614,6 +3616,99 @@ NULL,                                                    // #529
 NULL,                                                  // #530
 VM_SV_setpause,                                        // #531 void(float pause) setpause = #531;
 NULL,                                                  // #532
+NULL,                                                  // #533
+NULL,                                                  // #534
+NULL,                                                  // #535
+NULL,                                                  // #536
+NULL,                                                  // #537
+NULL,                                                  // #538
+NULL,                                                  // #539
+NULL,                                                  // #540
+NULL,                                                  // #541
+NULL,                                                  // #542
+NULL,                                                  // #543
+NULL,                                                  // #544
+NULL,                                                  // #545
+NULL,                                                  // #546
+NULL,                                                  // #547
+NULL,                                                  // #548
+NULL,                                                  // #549
+NULL,                                                  // #550
+NULL,                                                  // #551
+NULL,                                                  // #552
+NULL,                                                  // #553
+NULL,                                                  // #554
+NULL,                                                  // #555
+NULL,                                                  // #556
+NULL,                                                  // #557
+NULL,                                                  // #558
+NULL,                                                  // #559
+NULL,                                                  // #560
+NULL,                                                  // #561
+NULL,                                                  // #562
+NULL,                                                  // #563
+NULL,                                                  // #564
+NULL,                                                  // #565
+NULL,                                                  // #566
+NULL,                                                  // #567
+NULL,                                                  // #568
+NULL,                                                  // #569
+NULL,                                                  // #570
+NULL,                                                  // #571
+NULL,                                                  // #572
+NULL,                                                  // #573
+NULL,                                                  // #574
+NULL,                                                  // #575
+NULL,                                                  // #576
+NULL,                                                  // #577
+NULL,                                                  // #578
+NULL,                                                  // #579
+NULL,                                                  // #580
+NULL,                                                  // #581
+NULL,                                                  // #582
+NULL,                                                  // #583
+NULL,                                                  // #584
+NULL,                                                  // #585
+NULL,                                                  // #586
+NULL,                                                  // #587
+NULL,                                                  // #588
+NULL,                                                  // #589
+NULL,                                                  // #590
+NULL,                                                  // #591
+NULL,                                                  // #592
+NULL,                                                  // #593
+NULL,                                                  // #594
+NULL,                                                  // #595
+NULL,                                                  // #596
+NULL,                                                  // #597
+NULL,                                                  // #598
+NULL,                                                  // #599
+NULL,                                                  // #600
+NULL,                                                  // #601
+NULL,                                                  // #602
+NULL,                                                  // #603
+NULL,                                                  // #604
+NULL,                                                  // #605
+NULL,                                                  // #606
+NULL,                                                  // #607
+NULL,                                                  // #608
+NULL,                                                  // #609
+NULL,                                                  // #610
+NULL,                                                  // #611
+NULL,                                                  // #612
+NULL,                                                  // #613
+NULL,                                                  // #614
+NULL,                                                  // #615
+NULL,                                                  // #616
+NULL,                                                  // #617
+NULL,                                                  // #618
+NULL,                                                  // #619
+NULL,                                                  // #620
+NULL,                                                  // #621
+NULL,                                                  // #622
+NULL,                                                  // #623
+VM_getextresponse,                             // #624 string getextresponse(void)
+NULL,                                                  // #625
 };
 
 const int vm_sv_numbuiltins = sizeof(vm_sv_builtins) / sizeof(prvm_builtin_t);