From: havoc Date: Sun, 3 Jul 2005 07:07:34 +0000 (+0000) Subject: don't print PRVM_NAME in each dprint call, it looks terrible (prints multiple times... X-Git-Tag: xonotic-v0.1.0preview~4704 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=commitdiff_plain;h=c32e446060df3ccfcbec6fa49ab1146ae2ba7076;hp=a2335e296b76dd3477a80f8beeeedaf3e042c876 don't print PRVM_NAME in each dprint call, it looks terrible (prints multiple times per line because of multiple dprint calls without \n) fix fatal bug in findchain and findchainfloat which were using FindFieldOffset (which returns a byte array index) to get an offset to feed to PRVM_E_INT (which takes an integer array index) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5482 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/prvm_cmds.c b/prvm_cmds.c index e06c23f7..388ea5b2 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -564,7 +564,11 @@ void VM_dprint (void) if (developer.integer) { VM_VarString(0, string, sizeof(string)); +#if 1 + Con_Printf("%s", string); +#else Con_Printf("%s: %s", PRVM_NAME, string); +#endif } } @@ -849,7 +853,7 @@ void VM_findchain (void) if(!prog->flag & PRVM_FE_CHAIN) PRVM_ERROR("VM_findchain: %s doesnt have a chain field !\n", PRVM_NAME); - chain_of = PRVM_ED_FindFieldOffset ("chain"); + chain_of = PRVM_ED_FindField("chain")->ofs; chain = prog->edicts; @@ -903,7 +907,7 @@ void VM_findchainfloat (void) if(!prog->flag & PRVM_FE_CHAIN) PRVM_ERROR("VM_findchainfloat: %s doesnt have a chain field !\n", PRVM_NAME); - chain_of = PRVM_ED_FindFieldOffset ("chain"); + chain_of = PRVM_ED_FindField("chain")->ofs; chain = (prvm_edict_t *)prog->edicts;